Is it possible to create structs in classes, and then inherit from
another class.
I mean the class, to inherit from another class with the struct still intact
#include <iostream>
class foo
{
public:
struct foofoo {
int number;
};
};
class bar : public foo
{
public:
foo::foofoo foobar;
};
int main()
{
bar b;
b.foobar.number = 10;
std::cout << b.foobar.number;
}
Running example: http://coliru.stacked-crooked.com/a/b2f85b2cdd9332ab
Please let us know if you require any further questions.