C语言中,如何启动一个类?
来源:百度知道 编辑:UC知道 时间:2024/06/02 04:41:38
class Rtpart : public TclObject
{
friend class DTMSNAgent;
public :
Rtpart() : agent(0), bf(0) {
bind("sink_", &sink);
}
int command(int argc, const char*const* argv);
protected :
virtual void process(Packet *p) = 0;
virtual void start() = 0;
DTMSNAgent *agent;
Buffer* bf;
int sink;
};
如何编写一个函数 启动Rtpart 类?
{
friend class DTMSNAgent;
public :
Rtpart() : agent(0), bf(0) {
bind("sink_", &sink);
}
int command(int argc, const char*const* argv);
protected :
virtual void process(Packet *p) = 0;
virtual void start() = 0;
DTMSNAgent *agent;
Buffer* bf;
int sink;
};
如何编写一个函数 启动Rtpart 类?
C语言中没有类这个概念的。
不太明白启动是什么意思。
这个类中含有纯虚函数,属于抽象类,只能通过具体子类对象来完成相关操作,可以使用Rtpart指针。
C语言中,没有类