fork(1) download
  1. #include <stdio.h>
  2. struct k {
  3. int a;
  4. } test;
  5. int main(void) {
  6. struct k *o;
  7. o = &test;
  8. o.a = 25;
  9. return 0;
  10. }
  11.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:8:3: error: ‘o’ is a pointer; did you mean to use ‘->’?
  o.a = 25;
   ^
   ->
prog.c:6:12: warning: variable ‘o’ set but not used [-Wunused-but-set-variable]
  struct k *o;
            ^
stdout
Standard output is empty