想找大佬问一个问题,用c++如何从文件里面读取一行信息初始化一个链表节点的数据域,数据域有很多属性。文件结构如下:
2001 徐龙徐 中国 团员 信息工程学院 计算机 500101 18716772411 重庆万州 4001(这是文件的一行)
链表节点的定义如下:
struct student
{
int sno;//学生学号
string name;//名字
string sex;//性别
string nativeplace;//
string politic;
string college;
string major;
string id;
string phone;
string address;
string postcode;
student* next;
};