We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我通过宏展开看到def_class 同样会有类的声明 ,即使不是用declare_class 貌似也不会有什么问题。 我的理解是否对?
The text was updated successfully, but these errors were encountered:
declare_xxxx/dcl_xxxx 首先是一个结构性的东西,它对应C语言里面的前置声明。很多情况下,缺少了前置声明,几个结构体中存在相互引用的指针就做不到了。举一个最简单的例子:
typedef struct { ... example_t *ptNext; } example_t;
这是一个很普通的节点,里面有一个指向自己类型的指针,上述代码是编译不过的,因为定义指针的时候,example_t 还不存在——为了解决这个问题就需要前置声明:
typedef struct example_t example_t struct example_t { ... example_t *ptNext; };
declare_xxxx/def_xxxxx 就是对应前置引用。属于必不可少的。
Sorry, something went wrong.
No branches or pull requests
我通过宏展开看到def_class 同样会有类的声明 ,即使不是用declare_class 貌似也不会有什么问题。 我的理解是否对?
The text was updated successfully, but these errors were encountered: