Best "Curses" Library?

First off, I know there won't be a "best" library, each one will have it's pro's and con's, but I'm wondering which one is the easiest to use, and has good documentation for a relative new programmer. I have PD Curses, but I've heard others are better for cross-compatibly.
You've been misinformed.

There is only one "curses" (well, there's the really old version of curses, which you can safely ignore).

NCurses is the POSIX library implementation. Use it if you are compiling on *nix.
PDCurses is the non-POSIX implementation. Use it if you are compiling on Windows, OS/2, DOS, etc.

The two implementations have some differences, but they are relatively minor.
Oh, thanks! Do you know where I could find an online tutorial for PD Curses?

The NCURSES Programming HOWTO is the best place to start.

I have already visited this page. And since I'm a learner-by-doing, when I would copy the code (except for ncurses.h, I used pdcurses.h and panal.h), I would get errors.
I was unaware that the howto told you to #include <ncurses.h>, as this is almost always an error. (It has been a long time since I've read it myself.) You should #include <curses.h> .

If you really want to use <ncurses.h>, you'll have to create a new file in your 'include' directory:

/* NCurses is the wrong include. We fix it here to the correct one. */
#include <curses.h>

When you compile, make sure to link with the proper library.

    g++ ... myprog.cpp -lpdcurses

Here are a few examples to help you out:

Very basic example:

Playing with colors:

Good luck!

[edit] BTW, what is <panal.h>?
Last edited on
Thank you!
Topic archived. No new replies allowed.