#include "bankaccount.h"(or whatever your header file is named) in each of your derived classes' header files?
#includes at the top of your .cpp files?
using namespace std;, it defeats the purpose of having namespaces by bringing in the entire std ns into the global namespace, causing naming conflicts. There are lots of words one might use for variables & functions that are already in std, such as
std::count,
std::left,
std::right,
std::next,
std::distanceetc. Rather than worry about whether a variable is already in std, just put
std::before each std thing as in
std::cout,
std::stringetc.
BANK::Bankaccount MyBank(); // creates a Bankaccount object
usingstatement to provide an alias for it to shorten up references to them:
mattig89ch.setBalance(-1000000); // instant 1 million $ mortgage !!