文件输出 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 追加
 
 

文件输出 wstring string

上一篇:POJ 1887


下一篇:POJ3662 Telephone Lines