Originally posted by skillet
The problem is we have multiple constructors. One object is declared with a name and balance in the data, one with only a name, and one with no name and no balance. I don't think I can use all three constructors when one array of savings accounts is declared... am I wrong?
I believe you're right. Do you have to use constructors to init the data? You could use public functions:
Code:
savingsAccount* MyPointer;
int NrOfObjects=4;
MyPointer=new savingsAccount[NrOfObjects];
MyPointer[0].FakeConstructor1();
MyPointer[1].FakeConstructor2("Chelsea");
MyPointer[2].FakeConstructor1();
MyPointer[3].FakeConstructor3("Mercury", 4532);
...
delete[] MyPointer;