How to hide member variables in a dll-exported class
问题 I'd like to export a class with 1024 bytes in a dll file. class __declspec(dllexport) ExportedClass { private: char Data[1024]; // Holding 1024 bytes. public: void Foo(); }; So, when I give this header file of the class to my clients, I'd like to hide its member variable, char Data[1024] in this case. class __declspec(dllimport) ExportedClass { private: // char Data[1024]; // You don't have to know. public: void Foo(); }; However without the difinition of the Data, there is no allocation of