accessing/declare protected class in class
Hi,
I got a little problem over here and i like to have an advice, what i am doing wrong.
This is an example:
myMainClass.h
Code:
#include myClass.h
public class myMainClass
{
public :
//Constructor
myMainClass();
protected:
myClass mc;
}
myMainClass.cc
Code:
#include myMainClass.h
//Constructor
myMainClass()
{
mc::setOptions(...);
}
myClass.h
Code:
public class myClass
{
public:
//Constructor
myClass();
//method
void setOptions(...);
}
I want to declare myClass in myMainClass as protected member, so i can use myClass in myMainClass freely (in all methods there).
When i try to compile my project i get that mc "is not a class or namespace". So where is my error?
Thanks for your time