#include namespace foo { class TestClass { public: struct fuckingstruct { std::string clss; struct fuckingstruct1 { int x; }; }; }; } using namespace std; int main() { foo::TestClass::fuckingstruct::fuckingstruct1 test; test.x = 3; cout << test.x << endl; }