Answers for "string to wchar_t"

0

string to wchar_t

wchar_t* wide_string = new wchar_t[ s.length() + 1 ];
std::copy( s.begin(), s.end(), wide_string );
wide_string[ s.length() ] = 0;

foo( wide_string );

delete [] wide_string;
Posted by: Guest on October-09-2020

Browse Popular Code Answers by Language