摘要:
C++ 中关于文件的读入和输出:Example : 从in.txt 文件中读入数据,并输出到out.txt中,输出的文件中每行之间有一空行相隔#include#include#includeusing namespace std;int main (int){ string s; ifstream inf; inf.open("in.txt"); //打开输出文件 ofstream outf; outf.open("out.txt"); //从in.txt 文件中读入数据,并输出到out.txt中 /*其中 getline(参1,参2); 作用是从 in 阅读全文
posted @ 2011-09-23 10:11 bendanchenzhicheng 阅读(1127) 评论(0) 推荐(0) 编辑