PDA

View Full Version : C++ Help: Conio Library



NS_CHROME54
15-04-04, 02:57
having some strange issues with C++... MS Visual C++ 6 to be precise.

i just started doing c++ in my infotech class at school. we're using visual c++ 4 and dev-c++. we're having some strange issues with the conio library. it seems that getche() is the only conio function that will work in both environments (well, that i've used so far). kbhit() and getch() work in visual c++ (both 4 and 6), whereas clrscr() and gotoxy() only work in dev-c++.

does visual c++ have issues with the conio library? plz help.

XSuneX
15-04-04, 03:27
What is conio library?

greploco
15-04-04, 03:42
conio == console input output

(((aside: been a while since I've coded, but I remember those calls acting weird. I had to write a bunch of stupid test programs to get my head around them)))

Varaem
15-04-04, 04:01
dev-c++ has a lot of differences with visual c++, esp in the conio header. Check the help files how to make them work, but I haven't used C++ in about a year now. I remember I tried to do clrscr() on dev-c++ and took me about 20 min to figure out how to make it work like i wanted. help files are your friend. different IDEs sometimes have different header files, or implement them differently, so try actually open conio.h and read through it.

NS_CHROME54
15-04-04, 04:16
hmm maybe i should just get borland c++, they created the conio library in the first place...

Capt. Rik
15-04-04, 13:29
clrscr() and gotoxy() do not exist in the MSVC 6 (or .NET) version of conio.h.

Samhain
15-04-04, 14:32
I believe you can call system('clr') to clear the screen, I think the include is dos.h... and I'm pretty sure there are alternatives equal to everything you need.