Okay, so this is a parking ticket application... I'm sure you've all seen/done them before. This one is for C++ and I'm having trouble with getting my class-contained methods to access private members of a friend class. I know that this is completely a syntax error, but I can't seem to find an example that makes sense to me on what the syntax actually is.
This is (one of) the lines that I get errors on. They're all the same error,
cout<<"Please visit your local police department issued by "<<policeOfficer.name<<" badge number "<<policeOfficer.badgeNumber <<" to pay your $"<<fine<<" fine.";
And here is the beginning of the policeOfficer class, in case I haven't appropriately declared friend status between the classes.
class policeOfficer
{
private:
string name, badgeNumber;
public:
friend class parkedCar;
friend class parkingMeter;
friend class parkingTicket;
There's a couple of errors. "error C2027: use of undefined type" "left of '.badgeNumber' must have class/struct/union" "type name not allowed" "identifier createTicket is undefined"
But they all center around that single line of code, plus a few others that I have written the same exact way.
Sorry if I've missed anything necessary, I'd be more than happy to provide more information if I did.