turbo c 2.01

This is a discussion on turbo c 2.01 within the A Brief History of Cprogramming.com forums, part of the Community Boards category; sorry for the double-posting, but i think this one is better here : hi there i just installed turbo c ...

  1. #1
    Registered User dune911's Avatar
    Join Date
    Sep 2001
    Posts
    140

    turbo c 2.01

    sorry for the double-posting, but
    i think this one is better here :

    hi there
    i just installed turbo c 2.01 on a very old computer
    now i wanna test some functions like textcolor...

    can someone please let me know some simple textcolor
    functions to put out colored text with turbo c 2.01 ? thx!

  2. #2
    Registered User datainjector's Avatar
    Join Date
    Mar 2002
    Posts
    356

    conio.h

    you want to print color text right?

    WEll here is the format
    Code:
    #include <stdio.h>
    #include <conio.h>
    
    int main()
    {
      
       textbackground (RED);
       cprintf ("Background ");
    
       return 0;
    }
    or
    Code:
    int main()
    {
      textcolor (LIGHTGREEN)
      cprintf ("FOREGROUND");
    return 0;
    }
    remeber use cprintf() istead of printf ...printf does work fine on new compilers for printing color text.
    Last edited by datainjector; 07-17-2002 at 03:10 PM.

  3. #3
    Registered User dune911's Avatar
    Join Date
    Sep 2001
    Posts
    140
    i guess this works with borland only, right?
    my devc++ won't compile it... but turbo c does

  4. #4
    Registered User datainjector's Avatar
    Join Date
    Mar 2002
    Posts
    356

    you can use the conio.h header with dev to

    Okay this is what you do they are two ways the first is in the dev's hepl files FAQ the other one which is not there is :-

    option-->compiler options

    where it says Add the following command when the compiler calls add this c:\dev-c++\lib\conio.o and tick the box..

    Remeber you will always have to include the conio.h file when ever you are compiling a programm if you dont whant it that way then just uncheck the box if u dont want to use it ...Peace


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Remember Turbo? It is comming back
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2006, 01:26 PM
  2. turbo c 2.01
    By dune911 in forum C Programming
    Replies: 5
    Last Post: 07-16-2002, 10:32 AM
  3. Turbo C 2.01
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 05-10-2002, 09:59 AM
  4. Borland Turbo C 2.01 Floating Point Error
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 10-10-2001, 12:31 PM
  5. Need help installing Borland Turbo C 2.01
    By fatpotatohead in forum C Programming
    Replies: 2
    Last Post: 09-16-2001, 07:28 PM

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