Sportica   Sportica

随笔分类 -  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; } ... 阅读全文
posted @ 2011-12-07 16:49 qingjoin 阅读(362) 评论(0) 推荐(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... 阅读全文
posted @ 2011-12-07 15:56 qingjoin 阅读(1802) 评论(0) 推荐(0) 编辑

  Sportica
点击右上角即可分享
微信分享提示