How would you set the initial position of a Console App on your Screen?
5 Answers
It's a console app, so it has no concept of where its window is, as it doesn't know what a window is.
1 Comment
For Windows, you could use the GetConsoleWindow function followed by SetWindowPos with the SWP_NOSIZE and SWP_NOZORDER flags set.
Comments
I think that you're going to be more specific. With a console app, the output goes to stdout without any real control over how the console deals with it. The console deals with displaying it and normally just prints it out.
If you want more control over the console like being able to reposition the cursor or being able to erase or redraw portions of the console, then you'll likely need to look into a library like ncurses.