I have been working on getting this code for four days now and cannot figure out what I am doing wrong. I get the complier log down to 2 errors make one change and end up with 32 errors. Please help...
// Text-printing program.
#include <iostream> // allows program to output data to the screen
#include <windows.h>
// function main begins program execution
int main()
class Accountdatabase
{
public:
int getInput() const;
};endif
#ifndef Withdrawal_H
#define Withdrawal_H
#include <string>
using std::string;
class Withdrawal
{
public:
int getinput() const;
};endif
class Keypad;
class CashDispenser;
class Withdrawl;
#endif // WITHDRAWAL
#include <iostream>
using std::cerr;
using std::cin;
using std::cout;
using std::fixed;
using std::ios;
using std::left;
using std::right;
using std::showpoint;
#include <fstream>
using std::ofstream;
using std::ostream;
using std::fstream;
#include <iomanip>
using std::setw;
using std::setprecision;
switch ( input )
{
case 1: use cancelles transaction
case 2: use selection dollar amount to withdrawal, return amount
case 3: coorespondes with dollar amount arrays
case 4:
userChoice = amounts{ input ];
break:
case CANCELLED;
userChoice = CANCELLED;
break;
default:
screen.displayMessageline(
"\nInvalid selection." ;
}
Just how many files are there in this listing? It looks horribly disorganised. As far as I can see, your actual main function outputs some words and then returns. All the rest of the code is unused.
1 2 3 4 5 6
return userChoice;
system("PAUSE");
return 0;
}
See that return userChoice;? The function will return there; the code following it will never, ever, ever be run. I think you've misunderstood what return does.
1 2 3
case 1: use cancelles transaction
case 2: use selection dollar amount to withdrawal, return amount
case 3: coorespondes with dollar amount arrays
All those words after each case X: are not code. They're just words. That won't compile.
You've got using std::string all over the place, but you don't use any std::strings. I think you've misunderstood what that does.
1 2 3 4
int Choice();
}
while ( ( Choice =
You declare Choice to be a function, and then you try to make it equal to something as if it were a variable, and then you change case and start using choice; C++ is case-sensitive, but the way you try to change around whether something is a function of a variable implies that you've not really understood functions or variables. I think you need to stop and go right back to the beginning.