Quote:Original post by NukeCorr
Are there some critical errors/mistakes in them?
Yes. That code will invoke undefined behaviour.
killsMsg[0] = temp;
This is wrong, because you delete temp at the end of the scope (although using new[]/delete[] is bad practice here, using an automatic array will give the same error). Change that line to this.
killsMsg[0] = strdup(temp);
But ya know, if you used C++ and std::string instead of 1960's-era C this sort of thing wouldn't happen.
Edit: fixed strdup() function name.
[Edited by - Bregma on March 5, 2010 11:42:31 AM]