fork download
  1. #include <iostream>
  2. #include <string>
  3. #include "account.h"
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. char firstName[255];
  11. char lastName[255];
  12. char sinNumber[255];
  13. double balance = 0;
  14. int accountType = 0;
  15. int transactions = 0;
  16.  
  17.  
  18.  
  19.  
  20. //Retrieve client information
  21. cout << "Please fill out the information below for registration:" << endl;
  22. cout << "Enter first name: ";
  23. cin.getline(firstName, 255);
  24. cout << "Enter last name: ";
  25. cin.getline(lastName, 255);
  26. cout << "Enter SIN number: ";
  27. cin.getline(sinNumber, 255);
  28. cout << "Enter initial balance: ";
  29. cin >> balance;
  30. cout << "Enter account type:\n Chequing - 1\n Savings - 2 (Or any number)\n Choice: ";
  31. cin >> accountType;
  32. cout << "\nPlease wait..." << endl;
  33.  
  34. //Creating the account
  35. Account account(firstName, lastName, sinNumber, balance, accountType, transactions);
  36.  
  37. double deposit;
  38. double withdraw;
  39. double amount;
  40. double ammount;
  41. int transaction;
  42.  
  43. cout << "Amount to deposit: ";
  44. cin >> amount;
  45. deposit = account.DepositAmt(amount);
  46. cout << "Your new balance is: " << deposit << endl;
  47. cout << "Amount to withdraw: ";
  48. cin >> ammount;
  49. withdraw = account.WithdrawAmt(ammount);
  50. if (deposit >= 1 && withdraw >=1)
  51. {
  52. transactions = transactions + 2;
  53.  
  54. }
  55. else if (deposit >= 1 || withdraw >=1)
  56. {
  57. transactions = transactions + 1;
  58.  
  59. }
  60. else
  61. {
  62.  
  63. };
  64. cout << "Your new balance is: " << withdraw << endl;
  65. cout << account.getAccountType() << "\n" << endl;
  66. cout << "Statement is ready:\n " << endl;
  67. cout << "Transactions: " << transactions << endl;
  68.  
  69. }
  70.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:21: fatal error: account.h: No such file or directory
 #include "account.h"
                     ^
compilation terminated.
stdout
Standard output is empty