I have something resembling the following setup:
namespace MyNamespace
{
enum MyEnum{
Type1,
Type2
};
class MyClass
{
private:
void MyFunction( MyEnum::Type1 );
};
}
I would have assumed that since both MyEnum and MyClass are within MyNAmespace, using the enumerated types within the class wouldn’t be a problem, but when I try to compile it I get the following error:
'MyEnum::Type1' is not a type
How can I fix this so I can use my enum and class in the same namespace?
MyEnumis how you would reference it.where the definition might look like this: