conio.h problems - Programmers Heaven

Howdy, Stranger!

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

Categories

conio.h problems

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

Comments

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

    but how to do the header file and implementation file(like the one in the zip file) for other conio.h functions?
  • LundinLundin Posts: 3,711Member
    Check out the console functions for the Win32 API.
    Documentation on msdn.com.
  • red_applered_apple Posts: 18Member
    owh..ok..thnx!
  • red_applered_apple Posts: 18Member
    I checked msdn.com 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 Posts: 3,711Member
    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 Posts: 18Member
    i've tried that,it doesn't work.

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