fork download
  1.  
  2. #include "airlines.h"
  3.  
  4. int main(){
  5.  
  6. FILE *airports,*flights,*routes;
  7. int *option, a;
  8.  
  9. airports=fopen("airports.txt", "r");
  10. flights=fopen("flights.txt", "r");
  11. routes=fopen("routes.txt", "r");
  12.  
  13. if ( (airports == NULL) || (flights == NULL) || (routes == NULL)) {
  14. fprintf(stderr, "Can't open input file in.list!\n");
  15. } else{
  16.  
  17. a=5;
  18.  
  19. option = &a;
  20. *option = prompt();
  21.  
  22. if ( check_input(*option)== TRUE ){
  23. if(*option != '5'){
  24. printf("Enter option: %d\n", *option);
  25. }
  26. }else {
  27. printf("Incalid option. Try again.\n");
  28. }
  29.  
  30. }
  31. }
  32.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:22: error: airlines.h: No such file or directory
prog.cpp: In function ‘int main()’:
prog.cpp:6: error: ‘FILE’ was not declared in this scope
prog.cpp:6: error: ‘airports’ was not declared in this scope
prog.cpp:6: error: ‘flights’ was not declared in this scope
prog.cpp:6: error: ‘routes’ was not declared in this scope
prog.cpp:9: error: ‘fopen’ was not declared in this scope
prog.cpp:13: error: ‘NULL’ was not declared in this scope
prog.cpp:14: error: ‘stderr’ was not declared in this scope
prog.cpp:14: error: ‘fprintf’ was not declared in this scope
prog.cpp:20: error: ‘prompt’ was not declared in this scope
prog.cpp:22: error: ‘check_input’ was not declared in this scope
prog.cpp:22: error: ‘TRUE’ was not declared in this scope
prog.cpp:24: error: ‘printf’ was not declared in this scope
prog.cpp:27: error: ‘printf’ was not declared in this scope
stdout
Standard output is empty