c++ - Bank Account Program Issues with build and getting started -


onto program. program simulates bank account. need showing of balance, withdraw, , deposit. how show final balance after withdraw/deposit?

#include <iostream> #include <string> #include "baccount.h"      using namespace std;     int main ()     {         double amount = 0.0;         double withrdraw = 0.0;         double deposit = 0.0;         string name;         double startamount = 100.00;         double balance = 0.0;           cout << "name: ";         cin >> name;          cout << "initial balance: " << startamount <<endl;           cout << "deposit? ";         cin >> amount;         cout << "withdraw? ";         cin >> amount;           cout << "balance " << name  << " " << balance << endl;          system ("pause");          return 0;     } 

cout << "balance " << name () << " " << balance()     <<endl; 

by putting parenthesis after them, you're trying call name , balance functions, they're strings. remove parenthesis.

more importantly, made think had to include parenthesis there? there may fundamental piece of c++ you're confused (functions) should seek understand.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -