请告诉我如何为函数编写定义:
Product* getProductFromID(std::string);
void Store:: addMember(Customer* c)
addmember shud 将成员详细信息添加到名为 cart 的向量中,我尝试过类似这样的操作
void Store:: addMember(Customer* c)
{
Customer c(std::string n, std::string a, bool pm);
members.push_back(n.str());
}
我收到一条错误消息[Error] 'n' was not declared in this scope
。