I am using strcpy function to copy strings, but its giving a error error C2664: 'strcpy' : cannot convert parameter 2 from 'CString' to 'const char *'. i tried it using sprintf function but its also not working...
But VCProgrammer wants to save it to another location..
If he is using one thread he can get buffer and copy and that's no harm at all.
He wants to use strcpy function to copy the content of CString to another location, and he can do it by getting the buffer pointer. After copying contents it's no more he's concern about the CString's buffer.
I do not suggest to get buffer pointer and store it and use it. That'd have been really wrong.
As I said I do this in a common DLL I ahve written and use it all my app, and still don't have any problem about losing strings or crashing any application..