void writeFile(){
Employer *temp = head;
while (temp != NULL)
{
temp->tryWrite();//Employee's display method called here
temp = temp->getNext();
}
}
void main(){
EmployerList em;
em.AddNode("[email protected]", "LIME", "Manager", "ming", "ding", "Newston", "43", "873");
em.AddNode("[email protected]", "NOKIA", "CEO", "rew", "nbv", "Europe", "0411-789-6548", "985-257-1111");
//em.writeFile();
}
我想寫鏈接列表作爲一個對象的文件,而不是像我在tryWrite函數中的單獨。任何幫助?如何寫一個鏈接列表對象到一個文件
我知道它看起來很複雜,但我試圖將鏈接列表作爲對象寫入文件,而不是像我在tryWrite函數中一樣。任何幫助? – 2012-03-24 19:02:07
在那裏應該有一個問題嗎?此外,縮進你的代碼四個空格,使其顯示整齊。 – 2012-03-24 19:02:14
閱讀我對這個問題的評論,請@BenVoigt – 2012-03-24 19:03:41