+ 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

16th Jan 2019, 7:31 PM
Ankit Dey Purkayastha
Ankit Dey Purkayastha - avatar
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
21st Jan 2019, 7:53 AM
AKS
AKS - avatar
- 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...
16th Jan 2019, 8:11 PM
Aaron Eberhardt
Aaron Eberhardt - avatar