Ask your own question, for FREE!
Computer Science 11 Online
OpenStudy (anonymous):

can anyone tell me how to use gotoxy and clrscr in dev c++ compiler..i have tried many unfortunately not working....:(

OpenStudy (anonymous):

have you included necessary header files

OpenStudy (anonymous):

@iamcj- unfortunately no header files exits....

OpenStudy (anonymous):

dev c++ has no header files like stdio.h or conio.h??

OpenStudy (anonymous):

nope there are header files but none have the gotoxy included in them

OpenStudy (anonymous):

gotoXY is a graphical function and in standard c++ it is generally defined in graphics.h file..

OpenStudy (anonymous):

i will try that

OpenStudy (anonymous):

got it... in dev c++ you have to give your own header files... it doesnot come with its own.... it asks during every start up

OpenStudy (anonymous):

not working....

OpenStudy (anonymous):

@iamcj- it has stdio.h,stdlib.h......it doesn't only support the gotoxy function which essential for the graphics driven programs..i tried writing own header files but not working...:(

OpenStudy (anonymous):

there are many other compilers available.... try them... many are open source..

OpenStudy (anonymous):

they have graphics.h ,, even turbo c++ has graphics.h

OpenStudy (anonymous):

to use clrscr in c++, you must use a header file #include<conio.h>

OpenStudy (airdawg5571):

for "clrscr();" you may use "system("cls"); but you need to include conio.h. for gotoxy() it's a bit more complicated to explain. Here's a working example: #include <stdio.h> #include <conio.h> #include <windows.h> void main() { HANDLE consHandle; COORD consCoord; consHandle = GetStdHandle(STD_OUTPUT_HANDLE); consCoord.X = 30; //coord x consCoord.Y = 10; //coord y SetConsoleCursorPosition(consHandle, consCoord); //gotoxy replacement printf("Hello World\n\n"); _getch(); }

OpenStudy (anonymous):

i tried inserting the above function module but its all vain...

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!