I've tried doing:
CODE
#include <windows.h>
void gotoxy ( short x, short y )
{
COORD coord = {x, y};
SetConsoleCursorPosition ( GetStdHandle ( STD_OUTPUT_HANDLE ), coord );
}
int main()
{
gotoxy(5,5);
system("cls");
printf("Hello World!");
}
void gotoxy ( short x, short y )
{
COORD coord = {x, y};
SetConsoleCursorPosition ( GetStdHandle ( STD_OUTPUT_HANDLE ), coord );
}
int main()
{
gotoxy(5,5);
system("cls");
printf("Hello World!");
}
but my compiler (Digital Mars) give me:
QUOTE
COORD coord = {x, y};
^
file.c(5) : Error: constant initializer expected
--- errorlevel 1
^
file.c(5) : Error: constant initializer expected
--- errorlevel 1
It's been a while since I've coded in C so I have no idea what that means