LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-31-2012, 04:21 AM   #1
chinabenjamin66
Member
 
Registered: Mar 2012
Location: Shenzhen Chian
Posts: 73

Rep: Reputation: Disabled
What is the alternative of conio.h in linux?


Hello friends

I am a beginner of C programming under Linux(Ubuntu), I got an example of program which can run under windows, but when I try to complie it under Linux, I got such error:
Code:
root@gpl-vm:/lianxi/ch11# gcc -o formate9 formate9.c 
formate9.c:2:19: fatal error: conio.h: No such file or directory
compilation terminated.
root@gpl-vm:/lianxi/ch11#
I want to know what is the alternative of conio.h under Linux, since I knew it is oler header file under Windows, it doesn't exisit under Linux.

Best Regards
Benjamin.
 
Old 12-31-2012, 05:01 AM   #2
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Rep: Reputation: 108Reputation: 108
http://www.linuxquestions.org/questi...-linux-591002/
 
Old 12-31-2012, 05:52 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,860
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
ncurses
 
Old 12-31-2012, 12:23 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,220

Rep: Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319
This is what you want: http://sourceforge.net/projects/linux-conioh/

It depresses me to see people taking courses that still teach conio.h. Conio was never standard, and it's been deprecated everywhere, including Windows (ref: http://msdn.microsoft.com/en-us/library/hh674596.aspx)

Last edited by dugan; 12-31-2012 at 12:46 PM.
 
Old 12-31-2012, 11:35 PM   #5
dgashu
Member
 
Registered: Apr 2010
Location: Banglore
Distribution: fedora , rhel,Ubuntu
Posts: 61

Rep: Reputation: 1
Dear chinabenjamin66,

For most of the work stdio.h is sufficient in LINUX.
Are you looking for any specific functionality to use conio.h ....

Ashish
 
Old 01-01-2013, 12:24 AM   #6
chinabenjamin66
Member
 
Registered: Mar 2012
Location: Shenzhen Chian
Posts: 73

Original Poster
Rep: Reputation: Disabled
Hello all,
Thank you for your advice.
 
Old 08-03-2016, 07:49 AM   #7
MkojoA
LQ Newbie
 
Registered: Jul 2016
Location: McCarthy Hill
Posts: 2

Rep: Reputation: Disabled
Smile c++ programming

try using the #include<curses.h>
.....because curses.h provide almost all the functionalities that conio does ..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux-conio-1.02 nmansour Linux - Software 0 10-22-2007 12:58 PM
Conio.h for linux da_marius Programming 7 10-12-2007 01:26 AM
CONIO.H in linux like in DOS ravikumarG Programming 3 04-21-2005 02:03 AM
delay(), gettime() inside dos.h and conio.h in LINUX slickenside Programming 6 01-31-2004 05:13 PM
conio.h matt_w_lambert Programming 9 07-19-2003 12:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration