Can someone tell me if there is any error in my codes?
The compiler is able to compile and run the program
but I can't get the result I want.
Please help me.
I am using a gotoxy function.
I want to output a "@" character on a particular coordinate.
Here are my codes:
Code:#include <cstdlib>#include <iostream> #include<windows.h> using namespace std; void gotoxy (int x, int y) { COORD coordination; coordination.X = x; coordination.Y = y; SetConsoleCursorPosition(HANDLE(STD_OUTPUT_HANDLE),coordination); }; int main() { int x; int y; char w = '@'; cout<<"Enter x: "; cin>>x; cout<<"Enter y: "; cin>>y; gotoxy(x,y); cout<<w; system("PAUSE"); return EXIT_SUCCESS; }