What does this kind of C++ class declaration mean?
问题 I downloaded Ogre3D source code, and found this kind of class declaration: class _OgreExport TimeIndex { ... I know "TimeIndex" is the class name, but what is the "_OgreExport" in the middle? CPP reference doesn't include this kind of class declaration form. What is this? 回答1: _OgreExport is a preprocessor directive that expands to either __declspec(dllimport) when the file is included outside its module or __declspec(dllexport) otherwise. Under Windows, you have to specify which classes