I'm trying to correctly use a forward declaration for enums. Therefore I searched the Internet, but I can't find something that works.
I'm using this in a header:
// Forward declaration
enum myEnumProcessState;
I'm then using this enum in a struct:
struct myStruct {
[...]
myEnumProcessState osState;
[...]
};
And in another header:
enum myEnumProcessState {
eNotRunning,
eRunning
};
I found out that the type should be put in the enum forward declaration to be accepted. However, I don't know which "type" I should put for a Process State. These don't work:
enum myEnumProcessState : unsigned int;
enum myEnumProcessState : String;
I wanted to skip the forward declaration, but my struct is crying since it can't find it any more...
So I'm a bit confused. Is there a solution?