Advertisement

conio.h ?

Started by October 06, 2001 01:47 PM
3 comments, last by da_cobra 23 years, 2 months ago
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):
#include &ltwindows.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
Advertisement
For use gotoxy you need use turbo c++, in int, gotoxy is include in conio.h
Darkman-Brasil, we aren´t the thirth world;
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!
thanx alot for the reply''s !!!!

This topic is closed to new replies.

Advertisement