[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unknown malfunction of ncurses
From: |
Thomas Dickey |
Subject: |
Re: Unknown malfunction of ncurses |
Date: |
Tue, 11 Sep 2012 19:03:53 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Sep 11, 2012 at 12:01:39PM +0200, Anthony Marshall wrote:
> Greetings,
>
> Whilst trying Example 9. A Simple Color example in the
> NCURSES-Programming-HOWTO.html, I extended the program slightly, thus:
>
> /*
> * colr_ex.c color example
> *
> * $Revision: 1.46 $
> */
>
> #include <ncurses.h>
> #include <string.h>
>
> static char *msg[] = {
> "Viola !!! In color ...","A slightly longer string here ...",
> "Short string ..."
msg[] contains 3 strings (msg[0], msg[1], msg[2]).
msg[3] is undefined.
for (; x < 4; x++) {
print_in_middle(stdscr, LINES / 2, 0, 0, msg[x], x + 1);
> As you may notice in the main, I have commented out the for() loop because,
> uncommented, it seems to generate a segmentation error each time it is
> compiled in and run, and I cannot seem to work out why.
>
> Could you please advise me why this is the case and is there a solution?
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature