close
============== C++ 寫入檔案===============
#include<iostream>
#include<fstream>
using namespace std;
int main(){
//開檔
char filename[]="link.txt";
fstream fp;
fp.open(filename, ios::out);
for (int i=1;i<20;i++)
{
fp<<"http://test.com/"<<i<<".ppt"<<endl; //寫入檔案
}
fp.close(); //關檔
system("pause");
return 0;
}
文章標籤
全站熱搜