If I have 2 classes
a) class Business
b) class Customer
I want the Business class to be able to store a dynamic list of it's customers. So I thought the easiest way to do this would be to use a vector.
class Business
{
vector<Customer> customers;
public:
Business();
};
Business::Business()
{
//I want to be do something like this, but it's not working
customers.push_back(Customer("Name1"));
}
My question is how do I get Customer objects into my vector?