我在这里跑步时遇到一个奇怪的错误

时间:2014-09-05 06:52:51

标签: c++ xcode class inheritance

您好我在运行此代码时遇到了我从未见过的错误。实际上有2个错误。

这是第一个说Apple Mach-O Linker(id)错误

"Address::setAddress(std::__1::basic_string, std::__1::allocator >, std::__1::basic_string, std::__1::allocator >, std::__1::basic_string, std::__1::allocator >, std::__1::basic_string, std::__1::allocator >)", referenced from:

这是第二个Apple Mach-O Linker(id)错误 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

我在这个程序中有多个课程,所以我将它们链接到另一个网站,而不是在这里填充它。

这是我的代码的链接 https://gist.github.com/anonymous/646f6e2166c56688f739

先谢谢你们。

void Address::setAddress(const string street, const string city, const string state, const string zipcode) {
setStreet(street);
setCity(city);
setState(state);
setZipcode(zipcode);
}

1 个答案:

答案 0 :(得分:2)

在类setAddress中没有实现函数Address,只有声明。

void setAddress(const string street, const string city, const string state, const string zipcode);
相关问题