undefined reference to gotoxy in C | how to write any c program in middle ?
Hello Friends you have some time face this problem because Code blocks GUI doesn't work gotoxy() function. so you make function for it.
here
#include<stdio.h>
#include<windows.h>
void gotoxy(int a, int b)
{
COORD c;
c.X=a;
c.Y=b;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), c);
}
int main()
{
gotoxy(10, 25);
printf("hello");
getch();
}
0 comments:
Post a Comment