When classes / structures are connected in this way, you must inherit them. Put the public enumeration in the base class so that all the derived (related) classes can access it.
MFC ' CFile has specific enumerations that CStdioFile and other derived classes can use:
enum OpenFlags { modeRead = (int) 0x00000, modeWrite = (int) 0x00001, ... };
source share