Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C++

ASCII strings to Unicode in C++

4.89/5 (2 votes)
28 Mar 2011CPOL 28.1K  
std::string source = Hello World;std::wstring result( source.begin(), source.end() );One coding line less !
std::string source = "Hello World";
std::wstring result( source.begin(), source.end() );

One coding line less !

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)