I don't see the part where you store your passwords in raw text...
#include <iostream>
#include <string>
#include <Windows.h>
#include <Random>
using namespace std;
class Bank
{
public:
void CreateAccount()
{
system("cls");
Sleep(1000);
cout << "Enter An Account Id And You Will Be Ready To Go!" << endl;
cin >> AccountId;
Sleep(1000);
cout << "Your Login Will Be Your Id...Returing To Login..." << endl;
Sleep(2000);
system("cls");
Login();
}
void Login()
{
system("cls");
Sleep(1000);
cout << "Input Your Login:" << endl;
cin >> LoginId;
LoginReturn();
}
void BankMenu()
{
system("cls");
Sleep(1000);
cout << "Welcome User: " << AccountId << endl;
cout << endl;
do {
cout << "Balance(1)" << endl;
cout << endl;
cout << "Withdraw(2)" << endl;
cout << endl;
cout << "Deposit(3)" << endl;
cout << endl;
cout << "Exit(4)" << endl;
cout << endl;
cout << "Option:";
cin >> Banker;
BankReturn();
Sleep(5000);
system("cls");
} while (!exit);
}
void Balance()
{
system("cls");
Sleep(1000);
cout << "Your Balance Is:" << BalanceTotal;
Sleep(4000);
system("cls");
BankMenu();
}
void Withdraw()
{
system("cls");
Sleep(1000);
cout << "Your Balance Is:" << BalanceTotal << endl;
cout << "Withdraw Amount:" << endl;
cin >> WithdrawAccount;
cout << endl;
cout << "New Balance:" << BalanceTotal - WithdrawAccount << endl;
Sleep(5000);
system("cls");
BankMenu();
}
void Deposit()
{
system("cls");
Sleep(1000);
cout << "Your Balance Is:" << BalanceTotal << endl;
cout << "Deposit Amount:" << endl;
cin >> DepositAccount;
cout << endl;
cout << "New Balance:" << BalanceTotal + DepositAccount;
Sleep(5000);
system("cls");
BankMenu();
}
void LoginReturn()
{
if (LoginId == AccountId)
{
system("cls");
Sleep(1000);
cout << endl;
cout << "You Have Logged In You Will Now Be Returned To The Main Bank Menu." << endl;
Sleep(2000);
system("cls");
BankMenu();
}
else
{
system("cls");
Sleep(1000);
cout << endl;
cout << "Incorrect!" << endl;
Sleep(2000);
system("cls");
ExitProcess(0);
}
}
void BankReturn()
{
if (Banker == balance)
{
Balance();
}
else if (Banker == deposit)
{
Deposit();
}
else if (Banker == withdraw)
{
Withdraw();
}
else if (Banker == exit)
{
system("cls");
Sleep(1000);
cout << "Ending Process..." << endl;
Sleep(3000);
system("cls");
ExitProcess(0);
}
else if (Banker != withdraw || Banker != deposit || Banker != balance)
{
system("cls");
Sleep(1000);
cout << "Unrecognized Input!" << endl;
Sleep(2000);
system("cls");
ExitProcess(0);
}
}
private:
int AccountId;
char Banker;
int LoginId;
int BalanceTotal = 0;
int DepositAccount;
int WithdrawAccount;
//Should Probably Use An Array Below
char balance = '1';
char exit = '4';
char withdraw = '2';
char deposit = '3';
};
class Person
{
public:
void Start()
{
system("cls");
Sleep(1000);
cout << "To Create An Account Input N, To Exit Input Y..." << endl;
cin >> NewAccount;
switch (NewAccount)
{
case 'N':
cout << "Sending You To Account Creation...." << endl;
Sleep(3000);
bank.CreateAccount();
case 'Y':
system("cls");
Sleep(1000);
cout << "Exitting The Process..." << endl;
Sleep(3000);
system("cls");
ExitProcess(0);
}
}
private:
char NewAccount;
Bank bank;
};
int main()
{
Bank bank;
Person person;
SetConsoleTitle(L"Bank Program - By Verde");
HANDLE Colour = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(Colour, FOREGROUND_RED);
person.Start();
}
I don't see the part where you store your passwords in raw text...
Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!
dd/mm/yyyy
Member - 31/01/2015
Premium - 12/09/2016
Call of Duty minion - 05/11/2016 - 05/11/2019
BattleOn minion - 28/02/2017 - 05/11/2019
Battlefield minion - 30/05/2017 - 05/11/2019
Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
Publicist - 07/11/2017 - 02/08/2018
Cock Sucker - 01/12/2017 - Unknown
Minion+ - 06/03/2018 - 05/11/2019
Fortnite minion - 08/05/2018 - 05/11/2019
Head Publicist - 08/10/2018 - 10/01/2020
Developer Team - 26/10/2019 - 10/01/2020
Former Staff - 10/01/2020