Hello..
I have class cone, ctwo and class out_2 in base class (cone) which is derived from out class.
I want to have out_2 virtual, so I can define it in class ctwo..
I want to be able to call function out_func() and someotherfunc() from ctwo class.
I hope you can see from the code, what Im trying to do..Code:class out {
public:
void out_func() { }
};
class cone {
public:
virtual class out_2 : public out { }
out_2 cobject;
};
class ctwo : public cone {
public:
class out_2 : public out {
public:
void someotherfunc() { }
};
////////
void call() {
cobject.out_func();
cobject.someotherfunc();
}
};
int main() {
ctwo class_two;
class_two.call();
return 0;
}