fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct ADef A;
  4. struct A
  5. {
  6. int value;
  7. };
  8.  
  9. typedef struct BDEf B;
  10. struct B
  11. {
  12. struct A;
  13. int zorg;
  14. };
  15.  
  16. int main()
  17. {
  18. struct A a;
  19. struct B b;
  20.  
  21. b.value = 5;
  22. b.zorg = 42;
  23.  
  24. return 0;
  25. }
  26.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:12:13: warning: declaration does not declare anything
     struct A;
             ^
prog.c: In function ‘main’:
prog.c:21:6: error: ‘struct B’ has no member named ‘value’
     b.value = 5;
      ^
prog.c:19:14: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
     struct B b;
              ^
prog.c:18:14: warning: unused variable ‘a’ [-Wunused-variable]
     struct A a;
              ^
stdout
Standard output is empty