From the code itself what I see that it has compiler errors, The one you have pointer are linker errors which occurs after the successful compilation only(if there is any).
So the compiler errors are:
In second cpp file, the function definition of showBankMenu is incorrect.
void showBankMenu(bankAccount &, bankAccount &)
this syntax is valid for declaration purpose but while defining it is required to provide the variable names as
so i fixed that by putting them in public... i think. this is my first time ever doing any programming im in programming in c++ as my first semester at college and i dont really know what im doing at all...and what i have done has changed my error type.
1>------ Build started: Project: ATM, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\jesse\desktop\c++\atm\atm\main.cpp(13): error C3861: 'manageBankAccounts': identifier not found
1>c:\users\jesse\desktop\c++\atm\atm\main.cpp(17): error C3861: 'getProgStat': identifier not found
1> ATMfinal.cpp
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(70): error C2511: 'void bankAccount::showBankMenu(bankAccount,bankAccount)' : overloaded member function not found in 'bankAccount'
1> c:\users\jesse\desktop\c++\atm\atm\atmfinal.h(8) : see declaration of 'bankAccount'
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(128): error C3861: 'showBankMenu': identifier not found
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(131): error C3861: 'showBankMenu': identifier not found
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(134): error C3861: 'transMenu': identifier not found
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(137): error C2039: 'exitProgram' : is not a member of '`global namespace''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(137): error C2065: 'exitProgram' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(142): error C2143: syntax error : missing ';' before 'break'
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(146): error C2143: syntax error : missing ',' before '&'
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(151): error C2039: 'BankName' : is not a member of '`global namespace''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(151): error C2065: 'BankName' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(156): error C2065: 'account1' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(156): error C2228: left of '.getBankName' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(156): error C2065: 'account2' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(156): error C2228: left of '.getBankName' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(158): error C2065: 'account2' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(158): error C2228: left of '.getBankName' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(158): error C2065: 'account1' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(158): error C2228: left of '.getBankName' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(167): error C2065: 'account1' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(167): error C2228: left of '.getBankBalance' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(169): error C2065: 'account1' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(169): error C3861: 'transCheck': identifier not found
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(171): error C2065: 'account1' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(171): error C2228: left of '.transMoney2' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(171): error C2065: 'account2' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(174): error C2065: 'account2' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(174): error C2228: left of '.getBankBalance' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(176): error C2065: 'account2' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(176): error C3861: 'transCheck': identifier not found
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(178): error C2065: 'account2' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(178): error C2228: left of '.transMoney2' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(178): error C2065: 'account1' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(185): error C2143: syntax error : missing ';' before 'break'
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(190): error C2065: 'amount' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(193): error C2065: 'amount' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(196): error C2065: 'amount' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(199): error C2065: 'amount' : undeclared identifier
1>c:\users\jesse\desktop\c++\atm\atm\atmfinal.cpp(208): error C2065: 'exitProgram' : undeclared identifier
1> Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
- Account (a class to handle and keep track of all of the transactions and data relating to them)
- user information (if we make a vector<account_class>, then a user can have more than 1 account!)
- whatever else...
This way, you can treat your objects more like objects instead of.... well... an item... When you make a class, you want to make it general. Like a value, but an object.
If we were to create an account class with a generic (and unique) id that identified that account, we could tie that id to somthing else, like a person. This would make it easy to write, and then emplement, because you're just create a basic account, not any specific account, etc... You can define types of accounts, and have a short that represents this type. The member functions can use this to define their actions.
example:
1 2 3 4 5 6 7
#define CHECKING 1
//prototype for a function that will take the short acc_type and return a string that is the name of that type
string name_account_type(constshort&);
//..somwhere in a member function
cout<< ((name_account_type(this->acc_type).size() > 0) ? name_account_type(this->acc_type) : "Error: Invalid type!")<< endl;