0
ncurses_init();

ncurses_addstr(0, 0, "test");
ncurses_refresh();
ncurses_getch();
ncurses_end();

This should be displaying "test" at the top left, but it isn't. Any idea why?

PHP 5.1.6 CentOS 5.5

Got ncurses through yum install ncurses

it recognizes the ncurses functions, so I assume it should be working

Rob
  • 7,980
  • 30
  • 75
  • 115

2 Answers2

2

UH OH! Looks like someone forgot to read the docs!

ncurses_mvaddstr(0, 0, "test");
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
0

You need to change ncurses_addstr to ncurses_mvaddstr

Phil Lello
  • 8,377
  • 2
  • 25
  • 34