摘要: #include #include #include #include using namespace std;struct patron{ double mon; string name;};int main(){ int num,count1=0,count2=0; ifstream fin; char filename[20]; cout>num; fin.get(); patron *newp=new patron[num]; for(int i=0;i>newp[i].mon; fin.get(); } cout10000) { cout<<newp[j].n 阅读全文
posted @ 2013-12-03 02:00 编程的爬行者 阅读(183) 评论(0) 推荐(0) 编辑
摘要: #include #include #include const int SIZE=20;using namespace std;int main(){ char filename[SIZE]; char ch; ifstream inFile;//inFile 是有一个ifstream对象 cout>ch; while(inFile.good()) { ++count; inFile>>ch; } if(inFile.eof()) cout<<"End of file reached.\n"; else if(inFile.fail()) c 阅读全文
posted @ 2013-12-03 01:33 编程的爬行者 阅读(134) 评论(0) 推荐(0) 编辑