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?
You can do the following:
::Mii m
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With