// Overload for reading input streams
istream& operator >> (istream& in, Car& car)
{
in >> car.make >> car.model;
in >> car.yearModel;
in >> car.engineCapacity;
in >> car.tankStatus;
}
Complains....
Code:
error C2248: 'Car::make' : cannot access private member declared in class 'Car'
You either need to make it a of the friend class, or remove Car &car [which by the way should be const] and move it into the Car class. Either will work.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.