Hello. I am working on an ATM project on an Art project for Burning Man called Burn Wall Street, and am seeking help/advice on the code for our ATM (Always Taking Money)Machine.
So far I have only written terminal based programs in C++ and don't know how to use/configure a kiosk style GUI.
Because of this i don't think my code is going to be very useful (and isn't even complete or orderly, almost no tagging on anything, and some IF run on-s should be switches with a default action{hadn't gotten to changing it yet}).
But I'll include it anyways censoring some language content.
As stated in the post title this need to be displayed full screen on a kiosk style GUI. How can i incorporate this into my code? How is it done/configured?
/*
WellsF*ckYou.cpp
code by : J^$#i{ Sterling }%&@
*/
#include <iostream>
#include <conio.h> // for _kbhit() and _getch()
#include <iomanip> //for file manipulation
#include <cstdlib> //for random number generator
#include <ctime> //clock
#include <fstream> //for ofstream out to file.txt & ifstream fin from file.txt
#include<string> //for filename string
using namespace std;
//Functions
void get_Name(string &name);
void get_Pin(string &pin);
void get_Address(string &address);
int menu1();
int menu2();
void process_menuChoices(int menu1Choice, int menu2Choice);
int generateAccountBalance();
void sh^tTalkinResponses(int menu2Choice);
void gameMenu();
//global spaces
int accountBalance;
string account_Type;
int main()
{
string name;
string pin;
string address;
int menu1Choice;
int menu2Choice=3;
while(menu2Choice != 0){
get_Name(name);
get_Pin(pin);
get_Address(address);
menu1Choice = menu1();
menu2Choice = menu2();
process_menuChoices(menu1Choice, menu2Choice);
}
return 0;
}
void get_Name(string &name){
system("CLS");
cout << "Please enter your name:";
cin >> name;
return;
}
void get_Pin(string &pin){
system("CLS");
cout << "Please enter your pin:";
cin >> pin;
return;
}
void get_Address(string &address){
system("CLS");
cout << "Please enter your BRC address:" <<endl;
cin >> address;
return;
}
int menu1(){
string choice;
int selection=3;
while(selection != 1 && selection != 2) {
system("CLS");
cout<< "Would you like to:" <<endl;
cout<< "[1] Deposit" <<endl;
cout<< "[2] Withdraw" <<endl;
cout<< "PLease select 1 or 2." <<endl;
cin>> choice ;
if(choice == "1"){
selection = 1;
}
if(choice == "2"){
selection = 2;
}
}
return selection;
}
int menu2(){
string choice;
int selection=3;
while(selection != 1 && selection != 2 && selection != 666 && selection != 0) {
system("CLS");
cout<< "From:" <<endl;
cout<< "[1] Checking" <<endl;
cout<< "[2] Savings" <<endl;
cout<< "PLease select 1 or 2." <<endl;
cin>> choice ;
if(choice == "1"){
selection=1;
}
if(choice == "2"){
selection=2;
}
if(choice == "666"){
gameMenu();
}
if(choice == "qtfsn"){
selection=0;
}
}
return selection;
}
void process_menuChoices(int menu1Choice, int menu2Choice){
if (menu2Choice == 1){
account_Type = "Checking";
}
if (menu2Choice == 2){
account_Type = "Savings";
}
if(menu1Choice == 1 && menu2Choice == 1 || menu1Choice == 1 && menu2Choice == 2){
accountBalance = generateAccountBalance();
cout<< account_Type << " balance = " << accountBalance <<endl;
cout<< "There is an error with this machine at the moment." <<endl;
cout<< "Please bring your deposit to one of our agents at ....." <<endl;
system("pause");
}
if(menu1Choice == 2 && menu2Choice == 1 || menu1Choice == 2 && menu2Choice == 2){
sh^tTalkinResponses(menu2Choice);
}
return;
}
void sh^tTalkinResponses(int menu2Choice){
return;
}
int generateAccountBalance(){
int balance;
return balance;
}
void gameMenu(){
return;
}

New Topic/Question
Reply



MultiQuote






|