1613-3-傅溥衍 总结《2016年12月19日》【连续第八十天总结】

来源:互联网 发布:lbp算法 opencv实现 编辑:程序博客网 时间:2024/04/30 02:15
关键词:写代码
内容:读取成绩文件
A今日完成情况
1.读取成绩文件50%

B具体内容

读取成绩文件

#include<iostream>#include<fstream>using namespace std;float getscore(string filename,int stdno){int stdno_temp;float score;ifstream in(filename.c_str());   //打开成绩文件if(!in){   //判断文件是否打开正确cout<<"文件打开错误" <<endl;return 0; } }bool flag=false;while(in){in>>stdno_temp>>score;if(in){if(stdno_temp==stdno){flag=true;break;}}}if(!flag){}int main(){ifstream in("info.txt");   //学生信息文件 ofstream out("student.txt");  //学生完整信息文件if(!in||!out){cout<<"文件打开错误"<<endl;return 1;} }


C明日计划
A继续写


0 0