N
nsyforce
What is the correct way to convert a const char* to a CString? I'm
somewhat of a newbie and have tried several ways. While they all
convert ok, I'm using a profiler that shows a memory leak for every
option. Here's what I have tried:
const char* test;
test = getMyChar();
//CString myCString((LPCTSTR)test);
//CString myCString(test);
CString myCString = new CString(test);
delete myCString;
Thanks in advance for your help
somewhat of a newbie and have tried several ways. While they all
convert ok, I'm using a profiler that shows a memory leak for every
option. Here's what I have tried:
const char* test;
test = getMyChar();
//CString myCString((LPCTSTR)test);
//CString myCString(test);
CString myCString = new CString(test);
delete myCString;
Thanks in advance for your help