[問題] error看不懂

作者: zero221 (zero)   2008-10-27 21:01:53
我已經修改所有要修改的檔案了。(Thread.h,Thread.cc,Scheduler.h,Scheduler.cc)
但是在make的時候跳出error:
../threads/scheduler.cc: In constructor'Scheduler::Scheduler()':
error: no matching function for call to 'SortedList<Thread*>::SortedList(
<unresolved overloaded function type>)'
../lib/list.h:94: note:candidates are: SortedList<Thread*>::SortedList(
int(*)(T,T))[with T=Thread*]
../lib/list.h:92: note: SortedList<Thread*>::SortedList(const SortedList
<Thread*>&)
老實說除了看出應該是new SortedList時有問題我看不懂error訊息
我有寫 readyList= new SortedList<Thread *>(Scom);(我參考libtest寫的)
以及在scheduler.cc有寫 int Scom(Thread *x,Thread *y){...}
希望助教可以告訴我錯在哪裡,謝謝
作者: Artoo (artoo)   0000-00-00 00:00:00
你是不是把Scom放在class Thread裡面?

Links booklink

Contact Us: admin [ a t ] ucptt.com