⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 student.~c

📁 一次作业练习
💻 ~C
字号:
#ifndef STUDENT_H
#define STUDENT_H

#include <fstream>
#include <string>

class Student{
      public:
             Student();//post: has constructed an empty Student-object
             Student(string n, int id);//post: has constructed an student-object with name = n, student_id = id
             string get_name();
             int get_id();
             void set_name(string n);
             void set_id(int id);
             void read(istream& fin);//pre: fin contains at least one line with a name and a student-id
                                    //post: has read and stored the name and student-id
             void write(ostream& fout);//post: has written a line containing the name and the student_id


      private:
              string name;
              int student_id;






};



#endif

⌨️ 快捷键说明

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