其他分享
首页 > 其他分享> > 文件输出 wstring string

文件输出 wstring string

作者:互联网

#include <fstream>
#include <string>
#include <iostream>

int main()
{
    std::string input;
    std::cin >> input;
    std::ofstream out("output1.txt", std::ios::app);
    out << input;
    out.close();

    std::locale::global(std::locale(""));
    std::wofstream fout("output2.txt", std::ios::app);
    fout << L"嘿嘿嘿嘿嘿" << std::endl;
    fout.close();
    return 0;
}

 

 
std::ios::app 追加
   

标签:std,输出,string,app,ios,wstring,input,include
来源: https://www.cnblogs.com/Galesaur-wcy/p/14980004.html