Thread: Font/Text Colour

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    9

    Question Font/Text Colour

    8 royal blue arial

    Hey I was wondering if anyone can help,I'm a first year college student and doing an assignment but I sa something that would make it look really great but I can't remember where I saw it , there are comands to change the colour of text and make them 'flash' etc in C they were like \1 and \2 I think... If anyone can help I would really appreciate it, I use both Borland and Visual C++

    Cheers Dutch's Finest (Ahhh the Dutch Gold sorry an Irish joke)

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Can you be more specific?
    There are many compilers from both sources, and there is no single good answer given the range of possibilities
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    9
    Sure, well I want the main menu of the code bellow to flash and have different text colors
    My code is attached have a look and tell me what you think...

  4. #4
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    As far as the program is concerned, there are a couple of points you might want to look at:

    1) Main should be like this
    Code:
    int main( void )
    Also I see you used fflush( stdin ); to clear your buffer. You should have a look at this and this.

    As far as the text colour thing goes, good luck. You can look
    here for a start. Then try a search on the board.

    ~/

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    The first thing you need to do is to discover functions. A 400+ line main() which has barely begun to grow to its true size is a horrifying prospect.

    Like every case in main() should be
    case 1: do_british(); break;
    case 2: do_danish(); break;

    The second thing you need to do is get a lot more consistent about your indentation. Every editor has a different view of tabs, so stick to using just spaces for indentation. Then at least your code will look the same to everyone.

    Since you included conio.h, I guess
    cprintf()
    textcolor()
    textattr()
    are the functions you need to be looking at
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-24-2006, 08:36 PM
  2. Replies: 5
    Last Post: 03-01-2003, 04:52 PM
  3. DirectDraw colour matching
    By Hunter2 in forum Game Programming
    Replies: 2
    Last Post: 12-10-2002, 02:17 PM
  4. how to set the background colour of a static box?
    By Cobras2 in forum Windows Programming
    Replies: 2
    Last Post: 08-01-2002, 04:57 PM
  5. Colour theory... (weird title)
    By Magos in forum C++ Programming
    Replies: 5
    Last Post: 11-25-2001, 04:16 PM