Current Problem:
I need to access an enum from a class that is forward declared, similar to this situation:
Human.h
#include "Dog.h"
class Human{
public:
enum Language: uint32_t {
None = 0,
English = 1,
Japanese= 2,
};
}
Dog.h
class Human;
class Dog{
void understand(Human::Language speech);
}
Dog.cxx
#include "Dog.h"
#include "Human.h"
void Dog::understand(Human::Language speech) {
// Do stuff with Human::Language
return;
}
Errors:
- The IDE tells me Dog.cxx's implementation is not compatible with Dog.h's deceleration, citing the enum as
<erro-type>
in the error hint (only red squiggle) - When compiling, any mention of the enum in Dog.h/c.xx throws errors, not being able to find the enum
Extra Info:
- MSVC 15 2017
- Full architecture of program requires the enum to be accessible like this
- Forward Deceleration is mandatory in order to solve a circular dependency within my program that is not seen here