Hey guys, my family is starting a sort of in house bank and i want to write a program for it that will manage the accounts. I have started it a little bit and its not compileing. Its not much now but here is the source and the compiler log.
Code:
#include <iostream>
#include <fstream>
#include "stdafx.h"
using namespace std;
class Banker
{
public:
const int CHECKING = 1;
const int SAVINGS = 0;
Banker(string name, int sBalance);
~Banker();
int GetBalance(int account);
int Deposit(int amount, int account);
int Transfer(int amount, Banker recieve);
protected:
int balance;
string name;
};
int main()
{
cout<< "Welcome to the Cullen Familly Banking Program.\n";
cout<< "Please select a choice:\n";
cout<< "1. Deposit";
cout<< "2. Check Balance";
cout<< "3. Make a transfer";
return 0;
}
Compiling...
Bank Program.cpp
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(7) : error C2871: 'std' : does not exist or is not a namespace
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(13) : error C2258: illegal pure syntax, must be '= 0'
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(13) : error C2252: 'CHECKING' : pure specifier can only be specified for functions
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(14) : error C2252: 'SAVINGS' : pure specifier can only be specified for functions
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(17) : error C2629: unexpected 'class Banker ('
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(17) : error C2238: unexpected token(s) preceding ';'
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(24) : error C2146: syntax error : missing ';' before identifier 'name'
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(24) : error C2501: 'string' : missing storage-class or type specifiers
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(24) : error C2501: 'name' : missing storage-class or type specifiers
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(30) : error C2065: 'cout' : undeclared identifier
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(30) : error C2297: '<<' : illegal, right operand has type 'char [48]'
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(31) : error C2297: '<<' : illegal, right operand has type 'char [25]'
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(32) : error C2297: '<<' : illegal, right operand has type 'char [11]'
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(33) : error C2297: '<<' : illegal, right operand has type 'char [17]'
C:\Cpp Stuff\Bank Program\Bank Program\Bank Program.cpp(34) : error C2297: '<<' : illegal, right operand has type 'char [19]'
Error executing cl.exe.
Bank Program.exe - 15 error(s), 0 warning(s)