Alright so what I am trying to do is basically this.
I have an Account class, then I have a CheckingAccount and SavingsAccount class that inherit from the Account class.
In my program I have an array called accounts. It is going to hold objects of both types of accounts.
Account** accounts;
accounts = new Account*[numAccounts];
accountFile >> tempAccountNum >> tempBalance >> tempTransFee;
CheckingAccount tempAccount(tempBalance, tempAccountNum, tempTransFee);
accounts[i] = tempAccount;
I get an error when trying to assign tempAccount to the accounts array.
No suitable conversion function from "CheckingAccount" to "Account" exists.
How do I make the accounts array hold both kinds of objects?