#include <stdio.h> struct Inner { int x; }; struct Outer { struct Inner i; }; int main(void) { int (S::*p) = &S::x; S s = {.x = 1}; // your code goes here return 0; }
Standard input is empty
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};
^
Standard output is empty