5

I have a header resource that I'm making use of that defines a struct called

typedef struct { ... } Mii;

Now, in my own program, I'm writing a wrapper class that uses this struct privately and internally for its own operations, so I put my class inside my program's namespace to avoid conflict.

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

Now, I can refer to my wrapper class by CMii::Mii. Now, inside the implementation of doSomething:

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

The compiler thinks I'm referring to CMii::Mii. How can I tell the compiler I want to use the struct?

cemulate
  • 2,305
  • 1
  • 34
  • 48

1 Answers1

12

You can do the following:

::Mii m
Cem Kalyoncu
  • 14,120
  • 4
  • 40
  • 62