X
xgwzw
Unregistered / Unconfirmed
GUEST, unregistred user!
mfc讲到宏的模拟时,提到的cobject
//in header file
class cobject
{
public
virtual cRuntimeclass * getruntimeclass() const;
...
public
static cuntimeclass calssobject;
};
//
in implementation file
static char szcobject[]="cobject";
struct cuntimeclass cobjet::classcobject={szcobjet,sizeof(cobject),oxffff,null,null,null};
//
static afx_classinit _init_cobject(&cobject::classobjectr);
//请问这是函数的声明,还是定义 ,或者静态变量的赋值, 或者还是别的什么?
我翻了好多c/c++的书籍 ,还是不知道,什么意思,请大侠能告知一二
//
cuntimeclass *cobject ::getruntimeclass() const
{return &cobject::classcobject;
}
//in header file
class cobject
{
public
virtual cRuntimeclass * getruntimeclass() const;
...
public
static cuntimeclass calssobject;
};
//
in implementation file
static char szcobject[]="cobject";
struct cuntimeclass cobjet::classcobject={szcobjet,sizeof(cobject),oxffff,null,null,null};
//
static afx_classinit _init_cobject(&cobject::classobjectr);
//请问这是函数的声明,还是定义 ,或者静态变量的赋值, 或者还是别的什么?
我翻了好多c/c++的书籍 ,还是不知道,什么意思,请大侠能告知一二
//
cuntimeclass *cobject ::getruntimeclass() const
{return &cobject::classcobject;
}