P
PSN
Hi all ..
here is the code which crashes at the time of freeing the pointer
memory.
************************************
char *complete_command;
complete_command = new char[strlen(command) + strlen(" >> moto_msg")];
strcpy(complete_command, command);
strcat (complete_command, " >> moto_msg");
<SOME IRRELEVANT FUNCTIONS/CODE>
if (flag != 1)
ULTI_ERROR = -6;
delete [] complete_command; // CRASHES HERE
**************************************
Can someone explain me what am i doing wrong ??
Thanks and regards,
Prakash
here is the code which crashes at the time of freeing the pointer
memory.
************************************
char *complete_command;
complete_command = new char[strlen(command) + strlen(" >> moto_msg")];
strcpy(complete_command, command);
strcat (complete_command, " >> moto_msg");
<SOME IRRELEVANT FUNCTIONS/CODE>
if (flag != 1)
ULTI_ERROR = -6;
delete [] complete_command; // CRASHES HERE
**************************************
Can someone explain me what am i doing wrong ??
Thanks and regards,
Prakash