Thread: Miracle C [I Need Help With Coloured Text]

  1. #1
    Registered User
    Join Date
    Sep 2002

    Question Miracle C [I Need Help With Coloured Text]

    I have to use Miracle C at college, but there is no way i can see of having coloured txt .

    The compiler doesn't come with conio.h and so i added the conio.h file from Turbo C to try and make it work.

    This is a test piece of code i used:

    #include <stdio.h>
    #include <conio.h>

    void main()
    printf("Hello, This text should be RED!!");



    this is the error i keep getting when try to compile:

    Miracle C Compiler (r3.2), written by bts.

    c:\Program Files\Miracle C\include\conio.h: line 41: Parse Error, expecting `'}''
    'enum text_modes { LASTMODE=-1, BW40=0, C40, BW80, C80, MONO=7, C4350=64 }'
    aborting compile

    I prosoume it doesnt like some of the functions/statements used in the conio.h?

    and way of gettin round this problem? diffrent version of the conio.h file maybe? or some other funtions/header files that can sort it instead?

    Thankz For Ya Help!!!

    Paul Roseby
    Shizzle Ma 'C' Whizzle's

  2. #2
    Registered User moi's Avatar
    Join Date
    Jul 2002
    using a .h from a lib that you dont have written for a compiler you dont have will NEVER work
    hello, internet!

  3. #3
    Registered User
    Join Date
    Sep 2002
    any ideas of anything else i cud try?
    Shizzle Ma 'C' Whizzle's

  4. #4
    Im a Capricorn vsriharsha's Avatar
    Join Date
    Feb 2002

    Thumbs up Low Level might help you...

    Try to access the Video memory (which has been discussed several times in the past) directly and there you can change the colours...But to do it, you need a better understanding of pointers, so just be careful.
    Have Fun.

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    Proper grammar and spelling would be a good start....Anyways, since I am not familiar with what sort of compiler I can offer two suggestions (both of which I have done before). If you can do what vsriharsha suggested do that. Otherwise, I have a windows specific solution. You can always use LoadLibrary() to grab whatever function does the colored text out of whatever dll it is in. By way I have never used the dll method for this, but I have used it for other things.

  6. #6
    Registered User
    Join Date
    Oct 2001
    is the function not textcolor() instead of colortext()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A Miracle has occurred in the realm of Hot Dogs
    By DavidP in forum A Brief History of
    Replies: 11
    Last Post: 05-08-2004, 03:18 PM