Then you forgot to refresh(); the screen, which is why you can't see the output.
I checked how ncurses work, and found out that ncurses.h is just a shortcut to curses.h <- you might want to include that. (possibly this will make compilation slightly faster?)