Howdy, Stranger!

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


conio.h problems

red_applered_apple Member Posts: 18
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.


  • LundinLundin Member Posts: 3,711
    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.
  • red_applered_apple Member Posts: 18

    but how to do the header file and implementation file(like the one in the zip file) for other conio.h functions?
  • LundinLundin Member Posts: 3,711
    Check out the console functions for the Win32 API.
    Documentation on
  • red_applered_apple Member Posts: 18
  • red_applered_apple Member Posts: 18
    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?
  • LundinLundin Member Posts: 3,711
    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 .

  • red_applered_apple Member Posts: 18
    i've tried that,it doesn't work.

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