How do I reset the curser?
In the consol, in C++, What is the commands to reset the curser back to the top left? That way, when I'm writing the next peragraph, it will write over what is already there.
Also, is there a way to lock the scrolling in the consol so if there are to many char, the top line willnot go off screen.
Quote:
In the consol, in C++, What is the commands to reset the curser back to the top left? That way, when I'm writing the next peragraph, it will write over what is already there.
You can use SetConsoleCursorPosition () function
Quote:
Also, is there a way to lock the scrolling in the consol so if there are to many char, the top line willnot go off screen
If you're overwriting the console buffer using SetConsoleWindowInfo () and SetConsoleActiveScreenBuffer (), they won't be scrolled.
Hth
V@T
Frogot to mention, This is in basic c++, not .net or windows. Just the dos console the comes up with the basic cout.
Quote:Original post by XenethIf you aren't going to include any windows headers, the system("CLS") command is your only method for resetting the cursor; it clears the console and moves the cursor back to the upper left. There is AFAIK no method for any of the others you mentioned without using Windows-specific functionality.
This is in basic c++, not .net or windows. Just the dos console the comes up with the basic cout.
Just as a note you can use windows functions without having a windows application. You can use them in console apps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement