What happens when you call scanw("%*d");
There is such code:
while (!quit) { for(int i = 0; i < rate; i++){ ch = getch(); if (ch != ERR){ for (int j = 0; j < (rate-i); j++) getch(); break; } } //scanw("%*d"); When I call scanw, ch as far as I understand becomes equal to -1.
Well, I need to use it just want to understand what it does.
scanw, notscanf? ... - Harryscanf, it would read a decimal integer (skipping the preceding whitespace characters, if any), while reading, would stop at the first character that cannot be interpreted as part of the number, and just throw away what was read into nowhere ... - Harry