conio.h ?
Hi,
I''m still veeeery new to c++ and to learn it I bought a book
I''m already on page 200
anyway : In that book they use the command "gotoxy()" for in a dos window, I need the "conio.h" file for that command.
I have that file in my include directory and I use the "#include "
so everything fine untill here : when I run my program I get an error : "error C2065: ''gotoxy'' : undeclared identifier"
could it be that I have a wrong "conio.h", because I openend it in my wordpad and I couldn''t even find the word "gotoxy"???
can someone pls help me..
thanx in advance
gotoxy() is not part of the Standard C Library; it's probably a function that the book authors provide somewhere in there.
Here's the code (we use it in one of our Computer Science classes):
EDIT: includes
Edited by - Oluseyi on October 6, 2001 2:55:08 PM
Here's the code (we use it in one of our Computer Science classes):
#include <windows.h>void gotoXY (int x, int y){ HANDLE h = GetStdHandle (STD_OUTPUT_HANDLE); COORD pt; pt.X = x; pt.Y = y; SetConsoleCursorPosition (h, pt);}
EDIT: includes
Edited by - Oluseyi on October 6, 2001 2:55:08 PM
For use gotoxy you need use turbo c++, in int, gotoxy is include in conio.h
Darkman-Brasil, we aren´t the thirth world;
October 06, 2001 02:11 PM
Don´t care if you don´t have a copy of a DOS C compiler like Turbo C, that function is practically useless, so nevermind!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement