I have a header file (A):
namespace CChristianLifeMinistryDefines
{
using S_DISCUSSION_HIST_ITEM = struct tagDiscussionHistItem
{
CString strName;
Schools eSchool;
COleDateTime datMeeting;
};
using DiscussionItemHistList = list<S_DISCUSSION_HIST_ITEM>;
}
The above header file is included in another header file (B):
#include "ChristianLifeMinistryDefines.h"
using namespace CChristianLifeMinistryDefines;
enum class Schools
{
kMain,
kClass1,
kClass2,
kCount
};
The problem I have (and I understand why) is that Schools
is referred to in the S_DISCUSSION_HIST_ITEM
structure which is defined before the Schools
enum.
Error C3646: 'eSchool': unknown override specifier
The enum was already defined in my project and can't be moved else things might break down when compiling.
What I have done is move the class definition from file B to file A. But was there another solution to this? I couldn't simply include header B in header A because I get a circular reference and I can't get my head around what I found on the internet.