zhiyinjixu

  博客园  :: 首页  ::  :: 联系 ::  :: 管理
#include <fstream>

#include <iostream>

using namespace std;

int main()

{int a[10]={0};

ofstream outfile;

outfile.open("d:\\aa\\f2.txt" , ios::out);

if(!outfile)

{cerr<<"open error!"<<endl;

exit(1);

}

cout<<"enter 10 integer numbers:"<<endl;

for(int i=0;i<10;i++)

{cin>>a[i];

outfile<<a[i]<<"";}

outfile.close();

return 0;

}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

posted on 2011-11-14 16:36  zhiyinjixu  阅读(201)  评论(0)    收藏  举报