CPP HELP! | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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

11th Sep 2017, 6:06 PM
Yaovi K
Yaovi K - avatar
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;
11th Sep 2017, 6:42 PM
Yaovi K
Yaovi K - avatar