急求!第一次参加NOIP,C++提高组复赛,文件输入输出可以这样写吗 20
#include<iostream>#include<fstream>usingnamespacestd;intmain(){inta,b;FILE*fin,*fout;...
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
int a,b;
FILE *fin,*fout;
fin = fopen("file.in","rb");
fout = fopen("file.out","wb");
fscanf(fin,"%d%d",&a,&b);
fprintf(fout,"%d",a+b);
fclose(fin);
fclose(fout);
return 0;
}
麻烦帮忙解释一下rb和wb的意思 展开
#include<fstream>
using namespace std;
int main()
{
int a,b;
FILE *fin,*fout;
fin = fopen("file.in","rb");
fout = fopen("file.out","wb");
fscanf(fin,"%d%d",&a,&b);
fprintf(fout,"%d",a+b);
fclose(fin);
fclose(fout);
return 0;
}
麻烦帮忙解释一下rb和wb的意思 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询