+ 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

16th Jun 2020, 6:50 AM
Malik
Malik - avatar
16 odpowiedzi
0
Write exactly SetConsoleCursorPosition
27th Jun 2020, 7:30 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 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..
20th Jun 2020, 9:53 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 2
If you mind it then i'm sorry bro
22nd Jun 2020, 10:18 AM
Malik
Malik - avatar
+ 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
27th Jun 2020, 6:42 AM
Malik
Malik - avatar
+ 2
On setconsolecurser postion the dev c++ show an error that setconsolecurserposition not defined
27th Jun 2020, 7:23 AM
Malik
Malik - avatar
+ 2
Means
27th Jun 2020, 7:29 AM
Malik
Malik - avatar
+ 2
No bro its not working
27th Jun 2020, 7:36 AM
Malik
Malik - avatar
+ 2
Its generate error that getstdhandle was not declared in this scope
27th Jun 2020, 7:38 AM
Malik
Malik - avatar
+ 2
Yes i include windows.h
27th Jun 2020, 7:40 AM
Malik
Malik - avatar
+ 1
Thanks bro
20th Jun 2020, 10:14 PM
Malik
Malik - avatar
+ 1
Hey Ahmad Malik you have marked your answer as best. Do check that was your decision correct?
21st Jun 2020, 4:04 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 1
It's ok Ahmad Malik
22nd Jun 2020, 10:19 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 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
27th Jun 2020, 6:55 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 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
27th Jun 2020, 7:28 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 1
Did you include windows.h
27th Jun 2020, 7:37 AM
Nikhil Maroju
Nikhil Maroju - avatar