C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28629
Number of posts: 94611

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
conio.h problems Posted by red_apple on 13 Mar 2009 at 8:13 AM
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.
Report
Re: conio.h problems Posted by Lundin on 13 Mar 2009 at 8:31 AM
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.
Attachment: ConsoleFunctions.zip (925 Bytes | downloaded 288 times)
Report
Re: conio.h problems Posted by red_apple on 13 Mar 2009 at 10:14 AM
thanx.

but how to do the header file and implementation file(like the one in the zip file) for other conio.h functions?
Report
Re: conio.h problems Posted by Lundin on 13 Mar 2009 at 2:14 PM
Check out the console functions for the Win32 API.
Documentation on msdn.com.
Report
Re: conio.h problems Posted by red_apple on 13 Mar 2009 at 4:37 PM
owh..ok..thnx!
Report
Re: conio.h problems Posted by red_apple on 14 Mar 2009 at 9:20 AM
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?
Report
Re: conio.h problems Posted by Lundin on 16 Mar 2009 at 7:07 AM
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 <conio.h>.

Report
Re: conio.h problems Posted by red_apple on 18 Mar 2009 at 9:07 AM
i've tried that,it doesn't work.

what about the .o file?



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.