Results 1 to 1 of 1

Thread: colors aren't working using c++ and ncurses

  1. #1
    Join Date
    May 2010
    Beans
    21

    colors aren't working using c++ and ncurses

    In main I have:

    Code:
      start_color();
      init_pair(1, COLOR_RED, COLOR_BLACK);
    then I call a function which has:

    Code:
          attron(COLOR_PAIR(1));
          addch(theMap[x][y].getGraphic());
          attroff(COLOR_PAIR(1));
    It prints, but in the default color, no matter what I set the color pair to. I'm using bash in xubuntu (fully updated), though it doesn't work in ksh or csh (in terminal or xterm) either. All of the colors are correct in emacs (which uses curses, right?). Any ideas?
    Last edited by korgoth28; February 6th, 2012 at 12:21 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •