65,186
社区成员




#include <fstream>
using namespace std;
int main()
{
int a[10];
ofstream outfile;
outfile.open("student.txt",ios::app);
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;
}
// fstream standard header
#pragma once
#ifndef _FSTREAM_
#define _FSTREAM_
#ifndef RC_INVOKED
#include <istream>
#pragma pack(push,_CRT_PACKING)
#pragma warning(push,3)
_STD_BEGIN
#pragma warning(disable: 4127)
extern _MRTIMP2_NCEEPURE _Filet *__CLRCALL_PURE_OR_CDECL _Fiopen(
const char *,
ios_base::openmode, int);