My program is too big to put here, but this is basically the problem. The user must press J to interact, and it is supposed to wait for every single time J is pressed to output the next number, but instead it just keeps going. Isn't kbhit() supposed to wait for a key to be hit??
If there isn't a problem with this particular code, what do you think may be causing an almost similar coding to act that way? It just keeps going and ignores the getch. It ignores getch yet it keeps outputting numbers, which MAKES NO SENSE.
it makes perfect sense. its because kbhit is unbuffered input (i believe) so while you dont hit a key its not going to do anything but then when you do hit the key it will grab the number, but then getch grabs the number from kbhit