[ns] compiling error
Liu Gengpu
gpliu3@hotmail.com
Mon Apr 22 05:17:22 2002
Hello all ns users:
When I was compiling my new agent,I met such error listed below.
I dirived the class TryTimer from TimerHandler.
"try.h"
............
class TryTimer : public TimerHandler {
public:
TryTimer (TryAgent *a): TimerHandler() { a_ = a;}
void expire(Event *e);
protected:
TryAgent *a_;
};
......................
"try.cc"
TryAgent::TryAgent() :Agent(PT_PING)
{ //the 12 line!!! error was reported in this line
bind_time("interval_", &interval_);
}
Here is the error the compiler reported.
......................
try.cc
try/try.cc(12) : error C2512: 'TryTimer' :
no appropriate default constructor available
............................
By the way,the compiler I used is the nmake of VC6.0.
Can anyone tell me why I got this error?
Thanks a lot
gpliu from ustc of china
_________________________________________________________________
享用世界上最大的 Web 电子邮件系统 — MSN Hotmail:http://www.hotmail.com/cn