#include <iostream> using namespace std; int main() { struct hoge{ class hage{ int k; friend struct hoge; }; class hige{ hige(){ hage().k; } }; void moge(){ hage().k; } }; hoge::hige a; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:12:3: error: ‘main()::hoge::hige::hige()’ is private hige(){ hage().k; } ^ prog.cpp:18:13: error: within this context hoge::hige a; ^
Standard output is empty