studentcs_test.cpp

来自「一次作业练习」· C++ 代码 · 共 28 行

CPP
28
字号
/*******************************************************************************
*          Student Name: Zou Wenzhu           Student Number:1284932           *
********************************************************************************/

#include <string>
#include <fstream>
#include "StudentCS.h"
#include "Student.h"


int main(int argc, char *argv[])
{
  ifstream fin("C:\\Dev-C++\\MyFiles\\HW6\\6.c_d\\studentlist.txt");//file path name

  if(fin.fail())
  {
   cout<<"File not found."<<endl;
  }

  StudentCS s; //create an object
  s.read(fin); //read and store the content of the file
  s.write(cout); //output the content file to the console


  system("PAUSE");
  return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?