I am working on a C++ console app. I want to execute and print all the stuffs at the center of app window screen ( horizontally + vertically) as shown below.
--------------------------------
| |
| |
| User : xyz |
| Pass : **** |
| |
| |
--------------------------------
I want to run my whole program as how above. Is there any way to do so? Any help or suggestion would be appreciated.
How about this (LIVE EXAMPLE):
You get the idea. When centering the output vertically, you just put padding end lines at the top of the console.
If you want to keep your application in a console, but want to do some layouts I'd recommend using ncurses as it gives you more control on where you print, and also gives you a possibility to create menus, message boxes and other GUI-like stuff.
Example for WIN: