Question bout displaying with colors

This is a discussion on Question bout displaying with colors within the C++ Programming forums, part of the General Programming Boards category; Ok quick question bout changing text colors. I know how to change colors but when I have been dispalying and ...

  1. #1
    Unregistered
    Guest

    Question bout displaying with colors

    Ok quick question bout changing text colors. I know how to change colors but when I have been dispalying and going back to white i will place a paragraph of information but some random words in paragrah will be colored while other arent.

    EX-->

    textcolor(RED);
    system("pause");
    cout<<"This guide was written by Lord Zophar in order to
    help those with problems in the Medal of Honor Frontline
    game for the PS2 system. After playing this game for
    awhile, I realized I really loved it and so I decided I
    should put my love for the game to use. This game,
    while not too challenging, can still present problems
    for some gamers, such as finding a certain item or
    fighting a certain character. I warn you, this will
    contain spoilers, but it doesn't really matter in this
    kind of a game. I implore all of you to donate any
    information you want to me at my E-mail (Slasher962@aol.com).
    Well this is all for my intro right now, so onward,
    to the guide! Also, remember, I have worked very
    hard on this guide and donated a lot of my time to
    this guide. Please respect that and do not mess up
    my guide or steal it in any way becaue I am sure you
    would be mad if the same thing happened to you.
    ";

    RANDOM PARTS COME RED WHILE OTHERS ARE STILL WHITE.

  2. #2
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    oh boy....

    first of all... try it this way

    Code:
    // use `endl' to end the line and start a new one
    
    textcolor(RED);
    cout << "Blah blah..." << endl;
    cout << "Blah Blah Blah... << endl;
    and why do you have that pause there?
    What is C++?

  3. #3
    Unregistered
    Guest

    not full program

    pause there because only exerpt on my full program

  4. #4
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    ok...

    put
    Code:
    system("pause");
    textcolor(red);
    but i think it was because of your lack of ending the line
    What is C++?

  5. #5
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    If that doesn't work, you could try SetConsoleTextAttribute()
    A search on MSDN will yeild many useful results.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL question
    By WinteRx182 in forum C++ Programming
    Replies: 4
    Last Post: 04-22-2009, 09:51 AM
  2. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 01:14 PM
  3. Probably simple question: Displaying int's
    By conright in forum Windows Programming
    Replies: 8
    Last Post: 01-16-2003, 03:56 PM
  4. Question 'bout gcc and kernel
    By Jaguar in forum Linux Programming
    Replies: 5
    Last Post: 11-20-2002, 03:40 PM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM

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