student_test.cpp
来自「一次作业练习」· C++ 代码 · 共 29 行
CPP
29 行
/*******************************************************************************
* Student Name: Zou Wenzhu Student Number:1284932 *
********************************************************************************/
#include "Student.h"
#include <string>
#include <fstream>
int main(int argc, char *argv[])
{
ifstream fin("C:\\Dev-C++\\MyFiles\\HW6\\6.a_b\\studentlist.txt");//file path name
if(fin.fail())
{
cout<<"File not found."<<endl;
}
Student s; //create an object
s.read(fin); //read the file from the text file accord to the path name
s.write(cout);//output the file content to the console
system("PAUSE");
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?