首页 > 编程语言 > 详细

c++ 文件写例子

时间:2014-11-01 23:12:37      阅读:282      评论:0      收藏:0      [点我收藏+]
#include <iostream>
#include <sstream>
#include <fstream>>

using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
 ofstream myfile;
 myfile.open("example.txt");	
 myfile <<"write test";
 myfile.close();
	return 0;
}

c++ 文件写例子

原文:http://blog.csdn.net/drivermonkey/article/details/40688219

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