C ++: equivalent to "using namespace <namespace>", but for classes?
Suppose you have a class with an enumeration defined inside it:
class MyClass {
typedef enum _MyEnum{ a } MyEnum;
}
Is there a way to access the value of a from another class without referencing it as MyClass :: a? If the enumeration was contained in a namespace, and not in a class, than "using a namespace"; solves the problem - is there an equivalent way to do this with classes?
+3
user209178
source
share5 answers