随笔分类 - C++
摘要:#include <iostream>#include <fstream>using namespace std;int main(){ ifstream in; in.open("file1.txt"); //打开一个文件 char c; if(!in) //提示 { cerr<<"open failure!\n"<<endl; return 0; } ...
阅读全文
摘要:#include <iostream>using namespace std;int main(){ const int SIZE=50; //定义大小。 char name[SIZE]; cout<<"please input you name!\n"; //提示 cin>>name; //输入 cout<<"hello world:"<<name<<endl; //输出 return 0...
阅读全文