[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Help for programming in C



Buy The C Programming Language By K & R,

You have not installed the ncurses package.

getch() is not the same as in Turbo C++ 3.0
getch() will return the keypressed with echoing,

use keypad(window*, TRUE) to capture special key settings like F1, Del etc.

try 'man curs_getch' for more details

More in next
Aditya

----- Original Message -----
From: Sukrit K Mehra <holysmoke@xxxxxxxxxxxxx>
To: <linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx>
Sent: Sunday, January 07, 2001 12:31 AM
Subject: [LIP] Help for programming in C


> Hi Everyone.
> I am learning to program in C and I have problems learning things on linux
as
> most books have dos in mind. How do I avoid that?
>
> Also, I bought this book, The C Odyssey 3: Unix
> Its about c programming for Unix.
> Also it had this program which doesn't run on my linux system... though a
file
> called cruses.h does exist on my system.. I tried giving explicit path
too.
>
>
> #include "curses.h"
>
> main()
> {
> char buff[31];
> initscr();
> clear();
> flushinp();
> addstr("Enter your String :");
> refresh();
> getstr(buff);
> clear();
> move(5,30);
> addstr(buff);
> refresh();
> getch();
> endwin();
> }
>
> Why doesn't this program run. Has the cruses been changed... with effect
from
> ncruses.
>
> What books should I read...One of my friends was saying that getch()
function
> act different from dos version.. Is that true... Is there a programming
how to
> that points out all these differences etc somewhere on the net.
>
> sorry for the long and inchorent mail.
> Thanks
> Sukrit
> Ps... maybe somebody could point me to a nice mailing list on C and
related
> topics.
>
>
> ---------------------------------------------
> LIP is all for free speech.  But it was created
> for a purpose.  Violations of the rules of
> this list will result in stern action.