I recently ran into the problem that a CString globaly defined in a header file does not get any value when it gets assigned to in the cpp file.
cStringString = localCString;
While localCString has a value, cStringString hasn't changed and has no value.
Thanks for any answer/suggestion.
Hi, thanks for your reply.
I verified it and there isn't a local variable with the same name, I also tried declaring some other CStrings in the header with different names to be sure.
If I do the CSting = CString in the cpp file and the second one has a value, the first one (declared in the header) gets a 0x00000 <Bad Ptr> value.
If I move the declaration from the header to the cpp file the CString = CString does work. So somehow the declaration in the header doesn't work.
I use it in a windows mobile 5 project.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?