fork download
  1. #include <stdio.h>
  2.  
  3. while (!kbhit()){
  4. num_serial = print_serial();
  5. if(!num_serial%8){
  6. if(!strcmp( "noise", command_char )){
  7. send_command( "N o i s e", -10);
  8. }
  9. else if(!strcmp( "Voltage", command_char )){
  10. send_command( "V", parameter);
  11. }
  12. else if(!strcmp("Poll", command_char)){
  13. send_command("Poll", 0);
  14. }
  15. }
  16. }
  17. fflush(stdin);
  18. while (((ch=getch())!='\r') && (i < KEY_IN_BUFLEN - 1)) //press Enter to stop while loop
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:3:1: error: expected identifier or '(' before 'while'
 while (!kbhit()){
 ^
prog.c:17:4: warning: data definition has no type or storage class
    fflush(stdin);
    ^
prog.c:17:4: warning: type defaults to 'int' in declaration of 'fflush' [-Wimplicit-int]
prog.c:17:4: warning: parameter names (without types) in function declaration
prog.c:18:4: error: expected identifier or '(' before 'while'
    while (((ch=getch())!='\r') && (i < KEY_IN_BUFLEN - 1)) //press Enter to stop while loop
    ^
stdout
Standard output is empty