Ok I'm trying to print out a returned integer such as.
moneyBag.getCred();
Now i'm trying it in the following way.
void interface1(Bank* moneyBag) {
cout << moneyBag.getCred();
}
But I get the following error, any suggestions?
left of '.getCred' must have class/struct/union type
Ok I am trying to port my vending machine program from Java to C++, this isn't going a smoothly as I had planned however. And I get the following errors whenever I try to use cout.
C2872: 'cout' : ambiguous symbol
C2679: binary '<<' : no operator defined which takes a right-hand operand of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.