0

I really can't see why I can't get out of this loop when typing "exit":

int main(int argc, char * argv[]) {
    char cmd[500];
    do {
        printf("$ > ");
        fgets(cmd, 499, stdin);
        //executeCommand(cmd);

    } while (strcmp(cmd, "exit") != 0);
    return 0;
}
Sergey Kalinichenko
  • 714,442
  • 84
  • 1,110
  • 1,523
Andrei Olar
  • 2,270
  • 1
  • 15
  • 34

0 Answers0