Isn'T it obvious?
ifstream infile("data", ios::in);
string name, surname;
while (infile >> surname) {
infile >> name;
Person temp(infile);
Person(std::istream&);
istream and ifstream are not the same.
So the compiler does not know a proper constructor.
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115