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. Advertising

  2. kiko wrote:
    > How can I change the output text colour?


    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. Advertising

  3. kiko

    marbac Guest

    kiko schrieb:
    > 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.
    >
    >


    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?
    > 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.


    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JezB
    Replies:
    9
    Views:
    352
    Curt_C [MVP]
    Apr 30, 2004
  2. =?Utf-8?B?RGljaw==?=

    How do I change the colour of the grid in a GridView.

    =?Utf-8?B?RGljaw==?=, Jan 19, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    13,935
    Yuan Ren[MSFT]
    Jan 23, 2006
  3. gurdz
    Replies:
    4
    Views:
    1,185
    Gordon Burditt
    Aug 15, 2006
  4. Replies:
    0
    Views:
    351
  5. jodleren
    Replies:
    2
    Views:
    188
    Thomas 'PointedEars' Lahn
    Jan 12, 2008
Loading...

Share This Page