Search:

Type: Posts; User: matsp

Search: Search took 0.18 seconds.

  1. int ch; while ((ch = getchar()) != '\n' &&...

    int ch;

    while ((ch = getchar()) != '\n' && ch != EOF);

    put int ch in with your variables, and the line starting with "while" where you want to clean up your input buffer. Calling this after...
  2. That is the wrong solution - flushall is a...

    That is the wrong solution - flushall is a function that isn't guaranteed to do anything useful or meaningfull for input channels. _DO_ look up the FAQ link that was posted a few posts back. It...
Results 1 to 2 of 2