Unable to write a std::wstring into wofstream

前端 未结 1 1041
有刺的猬
有刺的猬 2020-12-19 11:54

I\'m using Qt/C++ on a Linux system. I need to convert a QLineEdit\'s text to std::wstring and write it into a std::wofstream. It work

相关标签:
1条回答
  • 2020-12-19 12:43

    Add

    #include <locale>
    

    and at the start of main,

    std::locale::global(std::locale(""));
    
    0 讨论(0)
提交回复
热议问题