@zengxiankui
2017-08-04T13:32:11.000000Z
字数 596
阅读 980
C
C++
struct ICallBack
{
int (*func1)(void); //函数指针
int (*func2)(void); //函数指针
};
struct ICallBack
{
ICallBack(void){};
virtual ~ICallBack(){};
virtual int func1(void){ return 0; }; //虚函数
virtual int func2(void){ return 0; }; //虚函数
};
struct ICallBack
{
ICallBack(void){};
virtual ~ICallBack(void){};
virtual int func1(void) = 0; //纯虚函数
virtual int func2(void) = 0; //纯虚函数
};
class ICallBack
{
public:
ICallBack(void){};
virtual ~ICallBack(void){};
virtual int func1(void){ return 0; }; //虚函数
virtual int func2(void){ return 0; }; //虚函数
};
class ICallBack
{
public:
ICallBack(void){};
virtual ~ICallBack(void){};
virtual int func1(void) = 0; //纯虚函数
virtual int func2(void) = 0; //纯虚函数
};