fork(1) download
  1. #include <stdio.h>
  2.  
  3. enum direction { DOWN, RIGHT, UP, LEFT };
  4.  
  5. void funcaoExemplo(enum direction var) {
  6. if(var == direction.DOWN) printf("%d", RIGHT); //só para testar
  7. }
  8.  
  9. int main(void){
  10. funcaoExemplo(DOWN);
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 2008KB
stdin
Standard input is empty
compilation info
prog.c: In function 'funcaoExemplo':
prog.c:6:15: error: 'direction' undeclared (first use in this function)
     if(var == direction.DOWN) printf("%d", RIGHT); //só para testar
               ^
prog.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty