+ 3
How to prevent the cursor from going to the next line after any input from the keyboard is taken to the running screen?
Prevent cursor from going to the next line after any input
2 Respostas
+ 5
In c++
cin command doesn't recognise space also
So you can use space key to enter different input in same line your cursor doesn’t move to next line instint of enter key see the below post for better understanding dear
https://www.sololearn.com/post/60951/?ref=app
https://www.sololearn.com/post/60950/?ref=app
- 1
I think this might be a OS specific problem because a solution for Linux might not work on Windows.
On solution would be escape sequences. Just print "\e[1A" after every input to move the cursor one row up to it's old position. (Don't know if it works on Windows though)
Alternatively there are some libraries that enable some further console tweaks...