[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

----- 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
> 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
> called cruses.h does exist on my system.. I tried giving explicit path
> #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
> ncruses.
> What books should I read...One of my friends was saying that getch()
> 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
> 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.