Search code examples
c++stringtostringwstring

Error : 'to_wstring' is not a member of 'std'


I don't know why this is not compiling.

std::wstring number = std::to_wstring((long long)another_number);

Compiler : gcc 5.1.0

IDE : codeblocks 17.12


Solution

  • Workaround

    std::string temp = std::to_string((long long)number);
    std::wstring number_w(temp.begin(), temp.end());