现在的位置: 首页 > 综合 > 正文

c++拷贝文件

2012年08月06日 ⁄ 综合 ⁄ 共 173字 ⁄ 字号 评论关闭
#include<fstream>
#include <string>
using namespace std;
int main()
{
    ifstream in("test.txt");
    ofstream out("testout.txt");
    for(string str; getline(in,str);)
        out<<str<<endl;
}

抱歉!评论已关闭.