fork download
  1. #include <stdio.h>
  2.  
  3. struct Inner { int x; };
  4.  
  5. struct Outer { struct Inner i; };
  6.  
  7.  
  8.  
  9. int main(void) {
  10. int (S::*p) = &S::x;
  11. S s = {.x = 1};
  12.  
  13. // your code goes here
  14. return 0;
  15. }
  16.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:10:8: error: expected ‘)’ before ‘:’ token
  int (S::*p) = &S::x;
        ^
        )
prog.c:11:2: error: unknown type name ‘S’
  S s = {.x = 1};
  ^
prog.c:11:9: error: field name not in record or union initializer
  S s = {.x = 1};
         ^
prog.c:11:9: note: (near initialization for ‘s’)
prog.c:11:4: warning: unused variable ‘s’ [-Wunused-variable]
  S s = {.x = 1};
    ^
stdout
Standard output is empty