Data movement between CString && string
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
1. How could I move data from a "CString" variable to a "C++ standard string class" variable? 2. How could I move data from a "C++ standard string class" variable to a "CString" variable? Thanks in advance.
-
1. How could I move data from a "CString" variable to a "C++ standard string class" variable? 2. How could I move data from a "C++ standard string class" variable to a "CString" variable? Thanks in advance.
I think this should help (I didn't check) CString strMfc; string strStl; strMfc = "Aaaa"; strStl = strMfc; //1st assignment -> simple strStl = "Bbbbb"; strMfc = strStl.c_str(); //2nd assignment -> use c_str() for char * conversion Miroslav Rajcic http://www.spacetide.com