Look at line 16 in HardwareStore.cpp:
HardwareStore(newShopper);
Here, you're invoking a constructor of
HardwareStore, that takes a
Shopper object as an argument. However, there is no such constructor; the only constructor you've defined takes an
int not a
Shopper:
1 2 3 4
|
HardwareStore::HardwareStore(int numRegisters):numRegisters(numRegisters)
{
//...
}
|
Even if you did have such a constructor, that line would achieve nothing except to create a temporary, unnamed
HardwareStore object that immediately disappears again.
I suspect that what you really want is to call
HardwareStore::addShopperToLine() passing in the new
Shopper object. Note, however, that you've defined
newShopper as a local variable, which means that when
HardwareStore::inputShopper() ends,
newShopper will go out of scope and be destroyed.