fork(2) download
  1. struct foo
  2. {
  3. int x;
  4. int y;
  5. };
  6.  
  7. int main() {
  8. struct foo a = {.y=10, .x=0 };
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:30: error: designator order for field ‘foo::x’ does not match declaration order in ‘foo’
  struct foo a = {.y=10, .x=0 };
                              ^
stdout
Standard output is empty