Hello, i'm quite new to programming and i heard there is away of stopping a repetitive structure using keyboard input. Something like:do....while ( press enter ). Could anyone tell me how could i do this please. Thank you.
If you are using Visual C++ you use the function _kbhit() to detect the keypress (with other compilers it may be just kbhit()). There's a very simple example from the Microsoft documentation here: http/msdn.microsoft.com/en-US/library/58w7c94c(v=VS.80).aspx . You should see from that how to construct a more complicated example.