Curses Problem
John Mundt
john at chinet.chi.il.us
Sat Nov 11 02:29:19 AEST 1989
In article <617 at dcscg1.UUCP> drezac at dcscg1.UUCP (Duane L. Rezac) writes:
>HELP!!!
>
>
>I am trying to use the curses package in a c program, and I can not determine
>what my problem is.
>main()
>{
> WINDOW *win;
> initscr();
> win=newwin(10,10,10,10);
> box(win,'+','+');
> wprintw(win,"this is a test");
> wrefresh(win);
> endwin();
> exit(0);
>};
You have not specifically placed the cursor before you issued
the wprint statment. That could leave the cursor location at
a spot outside of the window, in which case the print statement
won't execute (at least in my version it quietly fails if asked
to print outside of the legal boundaries.
You should do one of the following:
wmove(win, 0,0);
wprintw(win, "this is a test");
or
mvwprintw(win, 0, 0, "this is at test");
Either will work.
--
---------------------
John Mundt Teachers' Aide, Inc. P.O. Box 1666 Highland Park, IL
john at chinet.chi.il.us
(312) 998-5007 (Day voice) || -432-8860 (Answer Mach) && -432-5386 Modem
More information about the Comp.lang.c
mailing list