类关键字后的宏变量 [英] Macro variable after class keyword
本文介绍了类关键字后的宏变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Ogre Framework中发现了这个
I found this in Ogre Framework
class _OgreSampleClassExport Sample_Character : public SdkSample {
...
...
它是这样定义的
#define _OgreSampleClassExport
为什么我们要使用此宏变量?
Why we want to have this macro variable?
推荐答案
Presumably so a special qualifier, such as __declspec(dllexport)
, could be added to such classes by modifying (or conditionally defining) the define:
#define _OgreSampleClassExport __declspec(dllexport)
这篇关于类关键字后的宏变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文