Working on an assignment and keeping getting the following error at the 2 points in bold that call the class Account(int)
Code:main.cpp:67: error: invalid use of `class Account'Code:#include <iostream> using namespace std; /* * */ int choice; int choice2; class Account { private: int balance; public: Account(){ balance = 0; } Account(int a); int creditAccount(); int debitAccount(); void getBalance(); }; void menu(); void submenu(); int main(int argc, char** argv) { int amount; Account user1; Account user2; do { menu(); cout << "Choice: "; cin >> choice; switch (choice) { case 1: submenu(); cout << "Choice: "; cin >> choice2; switch (choice2){ case 1: cout << "Please Enter Opening Balance amount"; cin >> amount; user1.Account(amount); break; case 2: cout << "Please Enter Opening Balance amount"; cin >> amount; user2.Account(amount); break; case 9: break; } break; case 2: submenu(); cout << "Choice: "; cin >> choice2; switch (choice2){ case 1: user1.getBalance(); break; case 2: user2.getBalance(); break; case 9: break; } break; case 3: submenu(); cout << "Choice: "; cin >> choice2; switch (choice2){ case 1: cout << "Please Enter Lodgement amount"; cin >> amount; user1.creditAccount(); break; case 2: cout << "Please Enter Lodgement amount"; cin >> amount; user2.creditAccount(); break; case 9: break; } break; case 4: case 9: cout << "Thanks for Processing! Have a good Day!"; break; default: cout << "Invalid Option Selected. Please Try again!"; break; cout << "Choice: "; cin >> choice; } }while (choice != 9); return 0; } void menu(){ cout << "###############################################################" << endl << "## Account Transaction Menu ##" << endl << "## ##" << endl << "## ##" << endl << "## Please select the number for the option needed: ##" << endl << "## ##" << endl << "## 1. Enter Account Opening Balance ##" << endl << "## 2. Check Account Balance ##" << endl << "## 3. Make Account Lodgement ##" << endl << "## 4. Make Withdrawal from Account ##" << endl << "## 9. Exit ##" << endl << "## ##" << endl << "###############################################################" << endl; } void submenu(){ cout << "###############################################################" << endl << "## Account Transaction Menu ##" << endl << "## ##" << endl << "## ##" << endl << "## Please select the number for the option needed: ##" << endl << "## ##" << endl << "## 1. User1 ##" << endl << "## 2. User2 ##" << endl << "## 9. Back to Main ##" << endl << "## ##" << endl << "###############################################################" << endl; } Account::Account(int a){ if (a >= 0){ balance = a; } else { cout << "Invalid Amount Entered"; balance = 0; } } int Account::creditAccount(){ } int Account::debitAccount(){ } void Account::getBalance(){ cout << "The current available balance is: " << balance << endl << endl; cin.get(); }