Dave's Brain

Browse - programming tips - borland conio putch getch broken

Date: 2010apr23
OS: Windows
Language: C/C++

Q.  Why aren't Borland C++'s conio functions working for me?

A.  The <conio.h> function worked fine for older versions
of Windows but don't work for modern versions.

These are the functions:

	clreol( void );
	clrscr( void );
	gotoxy( int __x, int __y );
	getch( void );
	getche( void );
	kbhit( void );
	putch( int __c );
	wherex( void );
	wherey( void );

I have found that they work intermittently for me in Vista and later.

Instead use ReadConsoleInput WriteConsoleInput and friends.
http://www.google.com/search?q=ReadConsoleInput+WriteConsoleInput
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: