Horje
how to convert string to wchar_t in c++ Code Example
how to convert string to wchar_t in c++
std::wstring s2ws(const std::string& s)
{
    int len;
    int slength = (int)s.length() + 1;
    len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
    wchar_t* buf = new wchar_t[len];
    MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
    std::wstring r(buf);
    delete[] buf;
    return r;
}




Cpp

Related
qt get hexa value from qstring Code Example qt get hexa value from qstring Code Example
c++ primality test Code Example c++ primality test Code Example
conditional cout in c++ Code Example conditional cout in c++ Code Example
c++ vector decimal to binary Code Example c++ vector decimal to binary Code Example
c++ generate random char Code Example c++ generate random char Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8