and then i have an abstract class called Account. So when i try to create a new account using the vector of the customer class and store it in the vector by using a function.
what is the best way to solve this problem so that each customer can have one to many accounts using vectors. can i declare a vector on the main loop and have like
vector<Accout*> someName;
take this and use it for the class Customer? Any other way to solve it so that a Customer object has a collection of Account* Object
please im new at this stuff and would really appreciate for your help.
Since storeAccount is not a member function in the above code, the simplest fix is to change the argument inVector to a reference. Then the vector will be modifed in the calling code when the function is complete: