fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct memstruct{
  4. int type;
  5. }memstruct;
  6.  
  7. int main(){
  8. memstruct t1,t2;
  9. t1.type = 1;
  10. t2 = interpret(t1);
  11. return 1;
  12. }
  13.  
  14. memstruct getValueFromBind(memstruct bind){
  15. return bind;
  16. }
  17.  
  18. memstruct interpret(memstruct t){
  19. memstruct result1;
  20. result1 = getValueFromBind(t);
  21. return result1;
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 2152KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:10:7: warning: implicit declaration of function 'interpret' [-Wimplicit-function-declaration]
  t2 = interpret(t1);
       ^
prog.c:10:5: error: incompatible types when assigning to type 'memstruct {aka struct memstruct}' from type 'int'
  t2 = interpret(t1);
     ^
prog.c:8:15: warning: variable 't2' set but not used [-Wunused-but-set-variable]
  memstruct t1,t2;
               ^
prog.c: At top level:
prog.c:18:11: error: conflicting types for 'interpret'
 memstruct interpret(memstruct t){
           ^
prog.c:10:7: note: previous implicit declaration of 'interpret' was here
  t2 = interpret(t1);
       ^
stdout
Standard output is empty