fork download
  1. struct a{
  2. int y;
  3. struct b
  4. {
  5. int x;
  6. };
  7. };
  8.  
  9. int main()
  10. {
  11. a mystruct;
  12. mystruct.y = 5;
  13. mystruct.b.x= 2;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:13: error: invalid use of ‘struct a::b’
stdout
Standard output is empty