Let us take a simple function
::MessageBox(0,data.c_str(),"log",0);
where data is a std::sting type.
When i change the build type to unicode ,this will spit out error
error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR'
How can i feed in the underlying data of a std::string type(const char *),so that it builds smoothly in both MBCS and UNICODe builds.
::MessageBox(0,data.c_str(),"log",0);
where data is a std::sting type.
When i change the build type to unicode ,this will spit out error
error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR'
How can i feed in the underlying data of a std::string type(const char *),so that it builds smoothly in both MBCS and UNICODe builds.