Please tell me how to write definitions for the functions:
Product* getProductFromID(std::string);
void Store:: addMember(Customer* c)
addmember shud add the member details to the vector named cart and i have tried something like this
void Store:: addMember(Customer* c)
{
Customer c(std::string n, std::string a, bool pm);
members.push_back(n.str());
}
I get an error saying [Error] 'n' was not declared in this scope.
This line
declares a function
cthat takes three parameters and returns aCustomer. Not what you want at all.Assuming that a
Customercontains annmember (which really needs a more descriptive name), the function would just look like