How change text colour?

Discussion in 'C++' started by kiko, May 18, 2004.

  1. kiko

    kiko Guest

    How can I change the output text colour?
    Here is part of example source code:
    ....
    textcolor(4);
    cout << "text";
    ....

    The "cout" doesn't work with "textcolor".
    I don't want to use "cprintf".
    Thanx.
     
    kiko, May 18, 2004
    #1
    1. Advertisements

  2. There is no way in standard C++. Screen attributes (text colour included)
    are not controlled by any language construct but by OS-specific means.
    Please post your question to a newsgroup that deals with your OS.

    V
     
    Victor Bazarov, May 18, 2004
    #2
    1. Advertisements

  3. kiko

    marbac Guest

    Not standard c++ :

    http://en.tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html

    Don`t know if available for windows.
     
    marbac, May 18, 2004
    #3
  4. How can I change the output text colour?
    There exists no such thing as "colour" in Standard C++.

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    To iterate is human, to recurse divine.
    -L. Peter Deutsch
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    Prateek R Karandikar, May 26, 2004
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.