ERROR:

after Normal block (#260) at 0x00452508.

CRT detected that the application wrote to memory after end of heap buffer.

 

原因:宣告的記憶體跟刪除的記憶體大小不一致

 

Ex:

pass

     char* p=new char[6];

     strcpy(p,"aaaaa");

     delete[] p;

 

fail:

     char* p=new char[5];

     strcpy(p,"aaaaa");

     delete[] p;

 

 

 

________________________________________ 3S CONFIDENTIALITY NOTICE: This message and all attachments may contain legally privileged and confidential information. Any unauthorized review, use or distribution by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by replying to the message and delete all copies. Thank you.
arrow
arrow
    全站熱搜

    天才R 發表在 痞客邦 留言(0) 人氣()