EX_8
代码说明:
(1) 新建一个工程demo2,设计一个类Student,其成员变量包括学号(no)、姓名(name)、性别(sex)、专业(major)、联系方式(phone)和地址(addr)。 (2) 为类Student定义成员函数writeTo,实现从给定文本文件中读取学生数据,接口如下: void writeTo (char filename[ ]) (3) 为类Student定义成员函数readFrom,实现将学生数据保存到给定文本文件,接口如下: void readFrom (char filename[ ]) ((1) Create a new project demo2, design a class Student, whose member variables, including school (no), name (name), gender (sex), specialty (major), contact details (phone) and address (addr). (2) define the Student class member function writeTo, students achieve reading data a given text file, the interface is as follows: void writeTo (char filename []) (3) define the Student class member function readFrom, students will achieve data save to text file given, the interface is as follows: void readFrom (char filename []) )
下载说明:请别用迅雷下载,失败请重下,重下不扣分!