导航

2009年12月18日

摘要: 1.包含iostream和fstream; 2.创建一个ofstream的对象; ofstream outFile;3.将这个ofstream对象和一个文件关联起来;outFile.open("carinfo.txt");4.像使用cout一样使用ofstream对象。 outFile<<fixed;//fixed是用一般的浮点数格式输出,scientific是用科学计数法输出 out... 阅读全文

posted @ 2009-12-18 19:50 spock 阅读(224) 评论(0) 推荐(0)