i'm having trouble figuring how to make a pointer to my main function from my account class and my derived checking account class and savings account class.
this is what i got. it doesnt have the savingsccount in there yet. but i'm trying to make it so theres a constructor that has my derived classes of checkingaccount and savingsaccount i get this error
error C3867: 'CheckingAccount::doDebit': non-standard syntax; use '&' to create a pointer to member
1 2 3 4 5 6
int main()
{
Account * accounts;
accounts = new Account[2];
CheckingAccount c;
accounts[0] = & c;
since SavingsAccount and CheckingAccount are derived from Account consider using base class pointers to access derived classes as well - a simple example: