fork(1) download
  1. #include <stdio.h>
  2. void f(double (*)[3]);
  3. double a = 7.5;
  4.  
  5. int main()
  6. {
  7. double* b = &a;
  8. f(&b);
  9. printf("a = %lf\n", a);
  10. return 0;
  11.  
  12. }
  13. void f(double (*hi)[3])
  14. {
  15. double **sth = (double **) hi;\
  16. *(*sth) = 1;
  17.  
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:8:6: error: passing argument 1 of 'f' from incompatible pointer type [-Werror=incompatible-pointer-types]
    f(&b);
      ^
prog.c:2:6: note: expected 'double (*)[3]' but argument is of type 'double **'
 void f(double (*)[3]);
      ^
cc1: all warnings being treated as errors
stdout
Standard output is empty