How to Center Text in C++

Oct 24, 2014 at 2:40pm
Hi,

I'm using visual studio for C++ program and want to center my menu list at the center of the screen. How can I do this?

I've tried using something like this for the width: cout << setw(20) << "Text Here";
But what about for the height? Any help would be much appreciated.
Oct 25, 2014 at 5:55pm
If I recall correctly, the standard console window is 80 characters wide. Back in the DOS days, you could also be fairly confident that it was 25 lines high, but in windows that's not necessarily the case.
Topic archived. No new replies allowed.