Can there be anything between keyword 'class' and class name in c++? -


i encountered code in c++ class has been defined :

class macro class_name {      public :       private :  } 

if saw on windows code, macro determine if want export or import given class.

it's common if dealing dll-s.

so, macro this:

#ifdef  projectname_exports  #define macrobeforeclassname __declspec(dllexport) #else #define macrobeforeclassname __declspec(dllimport) #endif 

if compile dll, projectname_exports preprocessor definition should defined, compiler export given class. if compile project using given dll, ...exports won't defined, compiler import given class.


Comments

Popular posts from this blog

Upgrade php version of xampp not success -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -