Mar 30, 2011 at 5:20am
Here is my constructor that I made to take in these arguments: (it is in my Accounts. h)
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 36
|
#ifndef ACCOUNTS_H
#define ACCOUNTS_H
#include <string>
#include "Depositor.h"
using namespace std;
//Accounts class declarations
class Accounts {
int acct_num;
string acct_type;
double acct_balance;
Depositor depositor;
public:
//Constructors
// Accounts default constructor
Accounts()
{
acct_num = 0;
acct_type = "";
acct_balance = 0.00;
}
// Accounts constructor 2 - accepts 6 arguments:
Accounts(int acctnum, string accttype, double acctbalance,
int ssn,string lastname, string firstname)
{
acct_num = acctnum;
acct_type = accttype;
acct_balance = acctbalance;
depositor = Depositor(ssn,lastname,firstname);
}
|
This is why im confused as of why it isn't compiling. @_@ Is there more to this i should be considering?
Last edited on Mar 30, 2011 at 5:27am
Mar 30, 2011 at 6:03am
You are calling it as if it takes:
(string, string, int, int, string, double)
However your definition states it takes:
(int, string, double, int, string, string)
Order is important.
Apr 1, 2011 at 5:11am
ahhh yess... simple enough lol. thank you so much