我有这样的代码:C++引用传递:错误:没有匹配函数调用
bool Port::add_app_from_wlist(App* a){
stringstream namesurn;
string name, surname;
namesurn << a->get_name();
namesurn >> name >> surname;
return add_application(a->get_id(),name,surname,a->arrived_at_port_by(),a->arrived_by(),a->is_luxury_class());
}
我得到这个错误:
air_classes.cpp:153: error: no matching function for call to `Port::add_application(int, std::string&, std::string&, time_t, time_t, bool)'
air_classes.cpp:98: note: candidates are: bool Port::add_application(int, std::string, std::string, std::string, time_t, time_t, bool)
我不明白,在此字符串&来自于错误 - 我怎么能修改它 - 请帮助。
感谢-well--我想我现在必须删除我的帐户:惭愧: – 2010-11-27 21:19:56
@user:我记得自己多次犯这样的错误(并且没有人的帮助无法找到问题所在):-) Two一双眼睛肯定比一只眼睛好。 – Vlad 2010-11-27 22:50:50