I'm looking to add something exciting to my final project this semester. I'm trying to create a text-based combat game and I'm using a round counter for each attack. I want the round counter to display in the middle both vertically and horizontally of a blank screen between rounds. I know how to clear the screen, but how do I display it in the center? I thought of using
cout << " Round 1 ";
but in order for that to display in the middle, the only thing I know how to do is to add like, 20 lines of
cout << endl;
Please help me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.