I have created a function for my text game that places the text
on different places on the screen by using the X Y syntax.
Here is the function:
Is this still frowned appon, as I am finding it to be very useful when working with colour strings.Code:void gotoxy( int x, int y ) { COORD c; c.X = x - 1 ; c.Y = y - 1 ; // TO REMEMBER: 1ST NUMBER SPACES IN :: 2ND NUMBER SPACES DOWN SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), c ) ; }
Any comments taken onboard!! Thanx