fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /*
  6. *
  7. */
  8. class Account {
  9.  
  10. private:
  11. int balance;
  12.  
  13. public:
  14. Account(int a){
  15. balance = a;
  16. }
  17.  
  18. //Account(int a);
  19. int creditAccount();
  20. int debitAccount();
  21. int getBalance(){return this->balance;}
  22. };
  23.  
  24.  
  25. int main(int argc, char** argv) {
  26.  
  27. int choice = 1;
  28.  
  29.  
  30. switch (choice){
  31.  
  32. case 1:
  33. {
  34. /*cout << "Please Enter Opening Balance amount";
  35. cin >> amount;*/
  36. Account user1(10);
  37. cout << user1.getBalance();
  38. }
  39. break;
  40.  
  41. case 2:
  42. {
  43. /*cout << "Please Enter Opening Balance amount";
  44. cin >> amount;*/
  45. Account user2(12);
  46. cout << user2.getBalance();
  47. }
  48. break;
  49.  
  50. case 9:
  51. break;
  52. }
  53.  
  54. return 0;
  55. }
Success #stdin #stdout 0.01s 2680KB
stdin
Standard input is empty
stdout
10