下面是我的代码的一部分。我不确定它有什么问题,因为当我调试这段代码时,出现以下错误:
Unhandled exception at 0x60e8144c (msvcr90d.dll) in client0.exe: 0xC0000005: Access violation writing location 0x00000000.
这是 itoa 行中的某处。
代码:
int num = LOWORD (lparam);
char *number = NULL,*detail = NULL;
(char*)itoa(num,number,10);
最佳答案
您必须将有效的初始化指针传递给 itoa()
。
关于c - 使用 itoa 时未处理的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16910812/