0
CPP HELP!
Iâm writing a simple program I want the program to print out players balance after they enter their names so this is what I writtenZ cout << âthe wallet balance forâ<<&P1,fname<<âisâ <<WallerValue << endl; I get Error invalid opĂ©randes But when is write just cout << âthe wallet balance forâ<<fname<<âisâ <<WallerValue << endl; it prints only player 5 name it ignores other players
1 RĂ©ponse
+ 1
UPDATE I solved it:here is how it should have been written
cout << âthe wallet balance forâ<<P1.getName()<<âisâ <<WallerValue << endl;