Is there ANY standards compliant way to get unbuffered input from the console without the characters being automatically displayed?
because, although I can reset the buffer on cin to 0 with
cin.rdbuf->pubsetbuf(0,0) , when I do this, it outputs all characters twice (because it outputs them by default once?)
The reason this is necessary, is I am writing a program to do mathematical operations on numbers larger than those available in standard C++ datatypes, so I want to read 2 numbers from the console. I want to implement this in a way that the user can ONLY enter digits into the console, because it is cleaner than allowing an input, then erroring and asking for a correct input.
I've searched, and seen this question raised in other places, with the OP eventually either using getch(), or getting convinced that they really don't need the same functionality.
So, does anyone know of a standards compliant way to get the same functionality of getch() (and putch(), for that matter)?