→ herman602:class實做部分我沒貼出來 ... 03/11 20:22
推 littleshan: HeapSort case1(); 改成 HeapSort case1; 03/11 20:24
→ littleshan:否則compiler會誤以為case1是個回傳HeapSort的函式 03/11 20:24
我一開始也沒有括弧
可是就出現
[Linker error] undefined reference to `HeapSort::HeapSort()'
[Linker error] undefined reference to `HeapSort::show()'
[Linker error] undefined reference to `HeapSort::~HeapSort()'
[Linker error] undefined reference to `HeapSort::~HeapSort()'
Visual Studio 2008則出現
1>main.obj : error LNK2019: 無法解析的外部符號 "public: __thiscall
HeapSort::~HeapSort(void)" (??1HeapSort@@QAE@XZ) 在函式 _main 中被參考
1>main.obj : error LNK2019: 無法解析的外部符號 "public: void __thiscall
HeapSort::show(void)" (?show@HeapSort@@QAEXXZ) 在函式 _main 中被參考
1>main.obj : error LNK2019: 無法解析的外部符號 "public: __thiscall
HeapSort::HeapSort(void)" (??0HeapSort@@QAE@XZ) 在函式 _main 中被參考
實做部分在這http://src.wtgstudio.com/?n708kU
※ 編輯: herman602 來自: 123.195.208.178 (03/11 20:35)
→ herman602:已經解決 感謝yehsd XD" 03/11 21:29