LinuxQuestions.org
Review your favorite Linux distribution.
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 03-16-2004, 02:29 PM   #1
PhrozenFear
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Unhappy Newbie Question (asked before)


I'm sorry to be asking this, despite the best I've been able to figure it out and learn what I can.

Everywhere you look for info on functions in C++ programming from conio.h (like gotoxy() and kbhit()), and everyone says "Go use ncurses." But nobody explains what in ncurses to use, or even sites that offer help. Also a lot of peoeple seem to be saying that ncurses is a C library, not a C++ library.

So if anyone could help me understand what the heck is goin' on, that'd be great. I'm tryin' to do simple console-based programs (at least at the moment), and want to do stuff with the equivalent to conio.

Thanks in advance

_______________________
>>PhrozenFear
 
Old 03-16-2004, 03:33 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
In Linux, stdin.h doesn't offer funcions like gotoxy or keyboard control. Ncurses can do it for you. It works on text mode windows, you can write in them, move the cursor, control keyboard and so on. Ncurses is C library, that's true, but there's nothing that can stop you from using it in C++ programs.

If you don't miss functions like gotoxy, stay with stdin.h. If you need more, there's probaby a need for ncurses.
 
Old 03-16-2004, 03:36 PM   #3
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Re: Newbie Question (asked before)

Quote:
Originally posted by PhrozenFear
Everywhere you look for info on functions in C++ programming from conio.h (like gotoxy() and kbhit()), and everyone says "Go use ncurses." But nobody explains what in ncurses to use
I did,...well, for the kbhit thing, that is. See:

http://www.linuxquestions.org/questi...threadid=34027

Quote:
or even sites that offer help.
Frankly, that shouldn't be necessary.
Just googling for "ncurses" and "tutorial" gives a lot of results. Among these, the most obvious site to look: "The Linux Documentation Project", at:

http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/

Quote:
Also a lot of peoeple seem to be saying that ncurses is a C library, not a C++ library.
That 's true, but you can use it in C++ as well.

Ncurses is not as easy as conio. Two reasons for that:

(1) It's made for / usable on serial terminals, which are (were) known for their slow display. ncurses can deal with that.

(2) It can do more than conio
 
  


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
most asked question Nadim Slackware 8 02-16-2006 03:23 PM
this wine question was asked in '03 but never fully answered... breezewax Linux - Software 3 09-24-2004 08:33 AM
Have I asked a question that has no answer? vdemuth Linux - General 2 05-27-2004 09:16 AM
some question asked by a newbie compiling KDE3.2 tony yu Mandriva 2 02-15-2004 08:43 PM
How to enter characters of another language? A question asked again correro Linux - General 1 03-24-2003 08:35 AM

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

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