首页 > 其他 > 详细

文件输出 wstring string

时间:2021-07-07 12:53:59      阅读:25      评论:0      收藏:0      [点我收藏+]
#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

原文:https://www.cnblogs.com/Galesaur-wcy/p/14980004.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!