#include<iostream>
using namespace std;
int main(){
freopen("input.txt","r",stdin);//打开input文件,表明为读入,所有scanf的内容都是从这里读的
freopen("out.txt","w",stdout);//打开out文件,表明为写入,所有printf之类的内容都写在里面了
char str[200];
scanf("%s",str);
printf("%s\n",str);
printf("__hello!");
fclose(stdin); //关闭读入
fclose(stdout); //关闭写入
return 0;
}
C++文件读入
最新推荐文章于 2024-05-14 17:35:59 发布