Access outside the class namespace inside a class method?

I have a header resource that I use that defines a structure called

typedef struct { ... } Mii; 

Now, in my own program, I write a wrapper class that uses this structure privately and internally for its own operations, so I put my class in the program namespace to avoid conflict.

 namespace CMii { class Mii { ... void doSomething(); }; } 

Now I can reference my wrapper class using CMii :: Mii. Now, inside the doSomething implementation:

 void CMii::Mii::doSomething() { Mii m; ... } 

The compiler thinks I mean CMii :: Mii. How can I tell the compiler that I want to use a struct?

+4
source share
1 answer

You can do the following:

 ::Mii m 
+9
source

All Articles