Goto for a purpose... Is it legaL?
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:
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 ) ;
}
Is this still frowned appon, as I am finding it to be very useful when working with colour strings.
Any comments taken onboard!! Thanx