ERROR #1...accountc.cpp(24) : error C2039: 'displayMessage' : is not a member of 'Account'...
...account.h(4) : see declaration of 'Account'
EROOR #2... accounti.cpp(25) : error C2039: 'displayMessage' : is not a member of 'Account'...
...account.h(4) : see declaration of 'Account'
ERROR #3...accounti.cpp(27) : error C3861: 'getBalance': identifier not found
I tried the MSDN online help but I got no answers. I do not understand why display message would not be a member of class Account, because I declared displayMessage() in a header file Account.h and linked the header file with accountI.cpp and accountC.cpp using "#include "Account.h"". Furthermore, "displayMessage()" is declared public. I also don't understand why "getBalance" cannot be found because i declared getBalance with return type int and no parameters. I can successfully create the same kind of program with data hiding using strings instead of intergers... so I am thinking I did not declare a standard class int like I would declare #include <string>. Of course, I searched "standard classes" and did not find standard class int. The other problem I can think of is that int might be an invalid return type? therefore "string getBalance(); / return balance" would be valid while "int getBalance(); / return balance" would be invalid. As I stated earlier, the program works fine if i use strings instead of intergers... I am truly stumped :/
Code looks good, as pointed out above you just forgot to add the function prototype for displayMessage() to the class header file so the code never makes it to the displayMessage() function definition in AccountI.cpp.