how to print it

This is a discussion on how to print it within the C Programming forums, part of the General Programming Boards category; im tring to use this code to print to print diffrent colorz in stead of numbers , but i just ...

  1. #1
    unregisterd
    Guest

    how to print it

    im tring to use this code to print to print diffrent colorz in stead of numbers , but i just dont know how to start it.. can anyone help me start this .. please if you dont mind


    Code:
    #include <stdio.h>
    #include <ncurses.h>
    
    int main()
    {
            int x;
    
    
            if ((initscr() == NULL))
            {
                    printw("Error executing ncurses\n");
                    wrefresh(stdscr);
                    exit(1);
            }
    
            for(x = 6; x >= 0; --x)
            {
    
                    wclear(stdscr);
                    move(10, 25);
                    box(stdscr, ACS_VLINE, ACS_HLINE);
                    printw("This programm will start in %d\n",x);
                    wrefresh(stdscr);
                    sleep(1);
            }
            wclear(stdscr);
            move(10, 25);
            addnstr("PEACE OUT",9);
    
            refresh();
            sleep(1);
            endwin();
            exit(0);
    }
    btw.. this is in linux

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Try looking up
    start_color();
    has_colors();
    init_pair();
    wattrset();
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. merging linked lists
    By scwizzo in forum C++ Programming
    Replies: 15
    Last Post: 09-14-2008, 06:07 PM
  2. Personal Program that is making me go wtf?
    By Submeg in forum C Programming
    Replies: 20
    Last Post: 06-27-2006, 01:13 AM
  3. Scope And Parameter Passing
    By djwicks in forum C Programming
    Replies: 6
    Last Post: 03-28-2005, 08:26 PM
  4. What kind of programs should I start writing?
    By Macabre in forum C++ Programming
    Replies: 23
    Last Post: 04-12-2003, 09:13 PM
  5. Replies: 1
    Last Post: 07-31-2002, 12:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21