2014-09-05 145 views
0

嗨我得到一個錯誤,我從來沒有見過運行此代碼之前。 2個錯誤實際上。我在這裏運行時遇到了一個奇怪的錯誤

這是第一個,它說蘋果的Mach-O接頭(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: 

這裏的第二個蘋果的Mach-O接頭(ID)錯誤 鐺:錯誤:連接命令,退出代碼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); 
} 

回答

2

有一個在Address類,只有聲明沒有實現的功能setAddress

void setAddress(const string street, const string city, const string state, const string zipcode); 
+0

你將如何設置它?考慮到所有不同的變量。 – MatthewTingle 2014-09-05 07:01:04

+0

@MthethewTingle它是你的功能。你想問什麼?你可以從'Employee :: setAddress'中調用這個函數,但是你沒有實現它。 – ForEveR 2014-09-05 07:02:47

+0

我將setAddress添加到上面的帖子中。現在構建成功了,並打開了employeesOut.txt文件,但由於某種原因它沒有寫入,但完全沒有錯誤。 – MatthewTingle 2014-09-05 07:12:01

相關問題