I am novice of c++.
How to set co-ordinates of console using c++?
e.g. what to do if i wanna print pyramid of astericks at the center of the screen.
should i use gotoxy(x,y) function to go to the center of the console?

Recommended Answers

All 2 Replies

I am novice of c++.
How to set co-ordinates of console using c++?
e.g. what to do if i wanna print pyramid of astericks at the center of the screen.
should i use gotoxy(x,y) function to go to the center of the console?

No. You should print the correct number of spaces and newlines to center your 'image'. gotoxy() is very non-standard and does not exist in most compilers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.