The main reason for the seg fault is in this function. If the first read failes then you need to return ifs. ifstream &operator >>(ifstream &ifs, Person &p) { ...
確定! 回上一頁