我在程序中用到了itoa这个函数。
当程序一执行到这里函数就出现一个消息框:
Unhandled exception in RR.exe(MSVCRTD.DLL):0xC0000005:Access Violation
确定
弹出一个Find Source的对话框
提示写者:Please enter the path for XTOA.C
请问这是为什么?
该怎么解决?

解决方案 »

  1.   

    这是因为MSVCRTD.DLL的源代码没有发布呀,但调试信息里有它。
    Unhandled exception in RR.exe(MSVCRTD.DLL):0xC0000005:Access Violation
    表明你有内存操作的问题,仔细检查。
      

  2.   

    检查你的itoa的各个参数,按照下面方法,试试。
    int a=500;
    char buf[4];
    itoa(a,buf,4)
      

  3.   

    内存误操作,给出相关的用到itoa的代码
      

  4.   

    可能是
    itoa( int value, char *string, int radix );
    的string没申请内存或空间不够
      

  5.   

    char *cTemp;
    itoa(4,cTemp,10);
      

  6.   

    楼上的, 你的 cTemp没有分配内存TCHAR sTmp[20];
    itoa(4, sTmp, 10);就OK了
      

  7.   

    我把char *cTemp; 成char cTemp[8];就行了。
    为什么指针不行呢
      

  8.   

    申请内存
     cTemp=new char [8];