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 ответ
+ 1
UPDATE I solved it:here is how it should have been written
cout << “the wallet balance for”<<P1.getName()<<“is” <<WallerValue << endl;