i have had slightly the same problem hours ago.
i use the "Dev-C++ (Bloodshed) vers. 4.9.8.0" on a Windows XP machine.
Code:
if(kbhit())
{
i++;
}
instead of just executing the i++ one time it went on and on...
so someone came up with this solution:
kbhit() reads the keystroke into the buffer and doesn't
delete it afterwards. a "fflush(stdin)" doesn't do the job, so a "getch()" is definitly necessary here.
Code:
if(kbhit())
{
getch();
i++;
}
i'm sorry for any spelling mistakes for i am not a native speaker...