Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

ncurrses window and keypad
In my main function I first declare a few variables and I then call
these functions:

initscr();
noecho();
cbreak();
keypad(stdscr, TRUE);
refresh();

I then draw a few horizontal and vertical lines on the "standard
screen".

Next I make a window:

new_win = newwin(5, 5, 20, 15);
box(new_win, 0, 0);
wrefresh(new_win);

Infinite loop and switch

while (1) {

ch = getch();

printw("1");

switch(ch) {

case KEY_LEFT: ....
....

It compiles without any problems. When I execute it draws the vertical
and horizontal lines and displays the window. As soon as I press the
left arrow key I get: Segmentation fault

It never prints the 1.

Report this thread to moderator Post Follow-up to this message
Old Post
subflood
10-30-04 08:56 PM


Re: ncurrses window and keypad
subflood <PawelB.lnx@gmail.com> wrote:
> In my main function I first declare a few variables and I then call
> these functions:

you left something out, but there's not enough information to guess what.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Report this thread to moderator Post Follow-up to this message
Old Post
Thomas Dickey
11-01-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:15 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.