Hi.....
I have a problem with my code.
Let's say I have a pointer pointing to a vector of Customer pointers:
how would I be about to access the public methods in the Customer class?Code:vector<Customer*> *vCustomers;
for example, if I wanted to access a public method "void shop();"?
I tried:
but this is giving me an error:Code:vCustomers[0]->shop();
no matching function for call to `std::vector<Customer*,
std::allocator<Customer*> >::shop()'
Can anyone help me?
Thanks a lot!