+ 4
What is gotoxy() and how i can use this in the dev c++ compiler and on visual studio.
Please tell me by use it in a small project and also explain it
16 odpowiedzi
0
Write exactly SetConsoleCursorPosition
+ 2
The correct syntax is : gotoxy(int,int);
actually this is present in 'conio.h' which is not standard I think gotoxy() won't work in DEV-C++ but it would work perfectly in TurboC compliers
https://www.sololearn.com/Discuss/137663/?ref=app
https://www.sololearn.com/Discuss/2180992/?ref=app
You can check with these too..
+ 2
If you mind it then i'm sorry bro
+ 2
Bro if gotoxy() is not working on ANSI compilers then which function is used for this purpose on dev c++ .
please explain it with a small code
+ 2
On setconsolecurser postion the dev c++ show an error that setconsolecurserposition not defined
+ 2
Means
+ 2
No bro its not working
+ 2
Its generate error that getstdhandle was not declared in this scope
+ 2
Yes i include windows.h
+ 1
Thanks bro
+ 1
Hey Ahmad Malik you have marked your answer as best. Do check that was your decision correct?
+ 1
It's ok Ahmad Malik
+ 1
#include <windows.h>
void gotoxy(short x, short y) {
COORD pos = {x, y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
This works fine check this
+ 1
Hey , it's case sensitive so write the same as it is wherever it is capital write capital wherever it is small write there small letters
+ 1
Did you include windows.h