conio.h problems

hey there..

Firstly,I'm using windows vista,IDE: Codeblocks

I'm having problems with almost all of conio.h functions,both standard and non-standard.

for clrscr() and gotoxy(),I have to do the function prototype and definition in every C program that I want to use em.

even cprintf(),I have to type it as _cprintf().

for textcolor() and many more I don't know what to do.

keep getting error undefined reference to almost all conio.h functions.

please help.

thank you.


  • conio.h doesn't contain any standard functions what-so-ever. It is not guaranteed to work on any compiler but ancient Borland Turbo running on MS Dinosaur OS.

    I'm attaching a wrapper I have written for clrscr(), gotoxy() and getch(). It works under any Windows compiler, hope it is of any use.
  • thanx.

    but how to do the header file and implementation file(like the one in the zip file) for other conio.h functions?
  • Check out the console functions for the Win32 API.
    Documentation on
  • owh..ok..thnx!
  • I checked for the console functions and sadly,I don't really understand it.

    I downloaded a conio.h,conio.c and conio.o files.actually those files are for devc++.

    can I use those files in Codeblocks?if yes,how?
  • If you even can use them at all, I think you will have to include the .h and .c as part of your project, then include them with "conio.h" rather than .

  • i've tried that,it doesn't work.

    what about the .o file?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!