my simple ATM source has error..

Account, AccountList, taskManager,ioHandler <-classes in code.

my code:

Class part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class Account{

private:
	string accNum;
	string pin;
	int balance;
	string name;	
public:
	Account();
	Account(string i_accNum, string i_pin, string i_name,int i_balance){
	accNum=i_accNum;
	pin=i_pin;
	balance=i_balance;
	name=i_name;
	}

	string getAccNum(){return accNum; }
	string getPin(){return pin;}
	int getBalance(){return balance;}
	string getName(){return name;}


	void deposit(int money)
	{	
		balance += money;
		cout<<money<<"원이 입금되었습니다. Balance is"<<balance<<endl;
	}

	void withdraw(int money)
	{
		balance -= money;
		cout<<money<<"원이 출금 되었습니다. Balance is"<<balance<<endl;
	}

};  

Can I put mothods (deposit,withdraw) like that code?

and I got errors beneath..


1>atm5.obj : error LNK2019: "public: __thiscall Account::Account(void)" (??0Account@@QAE@XZ) 외부 기호(<-external symbol)(참조 위치(<-position of reference): "public: __thiscall AccountList::AccountList(void)" (??0AccountList@@QAE@XZ) Function)에서 확인하지 못했습니다(<-Can't confirm(?)).

1>C:\Users\SAMSUNG\documents\visual studio 2010\Projects\finalATM\Debug\finalATM.exe : fatal error LNK1120: 1개의 확인할 수 없는 외부 참조입니다.( External reference cannot confirm )


What is 2 errors? how can I solve it..
Last edited on
You have declared the default constructor on line 9, but did you define it? In other words, where is the code for it? The error you are getting is saying that the constructor is not defined.
Topic archived. No new replies allowed.