LinuxQuestions.org
Visit Jeremy's Blog.
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 10-01-2003, 02:26 PM   #1
dummybert
LQ Newbie
 
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Lightbulb getch in Linux?


Hi,

How to make a getch() in Linux? conio.h isn't in the common library, right?

Thanx guys. Linux rules
 
Old 10-01-2003, 03:46 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Correct!

If you want getch() it is in the ncurses library.

If you don't need the curses stuff then you can call getchar(). stdio.h
 
Old 10-03-2003, 02:43 AM   #3
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 31
I also have a question here on getchar().
when execute this instruction, getchar() does not return until you hit "return" key. But getchar() regards "return" as a valid input, so I have to add a verbose getchar() after the first. Am I correct on this? Thank you.
 
  


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
Where is getch()....... rajsun Programming 2 03-28-2005 11:40 AM
getch function prasad514 Programming 6 01-03-2005 11:48 AM
getch() in FC2 natm Programming 3 10-20-2004 02:26 PM
Help with getch... darkarcon2015 Programming 4 09-12-2004 08:48 AM
how to get getch() working with c++ cool_ashwin22 Programming 3 08-03-2004 10:58 AM

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

All times are GMT -5. The time now is 07:41 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