-4
阅读的对象。如果我有一个包含10行,每行包含有关下列对象信息的文件,从C++中的文件
class student
{
public:
string name;
int age;
int rollnum;
int year;
string father;
string mother;
string category;
string region;
char sex;
string branch;
int semester;
};
我怎样才能从文件中读取所有10个对象的信息? (我猜我将不得不采取10个对象的数组,这个)
重载'operator >>'。 – chris 2014-08-30 14:27:32
该怎么做。 – user3776323 2014-08-30 14:29:14
在网站上有一个[特别好,命名问题](http://stackoverflow.com/questions/4421706/operator-overloading)。 – chris 2014-08-30 14:31:44