i read somewhere that the string constats are available through the whole runtime of the application as they are embded in the executable itself and the compiler just calls the address location, thus not going out of scope, but maybe i didn't understand corectly.
Yes, that is, if you are certain that you will be supplying constant strings to those functions.
One more thing...
Msg_Len = strlen(_Message); m_Msg = new char[Msg_Len]; strcpy(m_Msg, _Message); To_Len = strlen(_To); m_To = new char[To_Len]; strcpy(m_To, _To); From_Len = strlen(_From); m_From = new char[From_Len]; strcpy(m_From, _From);
...do you think that solves your problem of heap corruption? My answer is a NO. Why? Because your memory allocation was based on the return value of strlen which do not include the EOS marker. Value must be strlen() + 1.