Results 1 to 3 of 3

Thread: C\c++ Borland 5.02

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2002
    Location
    in a little closet
    Posts
    30

    C\c++ Borland 5.02

    i am having a problem with the statement printf
    for some reason it wont work in borland 5.02 but fprintf will

    i try to define something and it wont work can someone help me?

    #define REVERSE fprintf("\033[Jm")

    the bloody fprintf wont be recognized what am I to do???
    All Help Very Much Appreciated

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    What do you mean not recognized? What is the error message?

    fprintf requires a FILE* as first parameter.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2002
    Location
    in a little closet
    Posts
    30
    ok well just checked now and it works. this is the code

    ----------------------------------------------
    # include <stdio.h>
    # define REVERSE printf("\033[7m")
    # define NORMAL printf("\033[0m")
    # define CLS printf("\033[2J")
    void main()

    {
    CLS;
    REVERSE;
    printf("1. A");
    NORMAL;
    printf("verage");
    }

    -----------------------------------------

    why does dos when i run the .exe display this

    <-[2J<-[7m1. A<-[0average

    i understand why it displays the 1. A average
    but whats with the other crap? does dos not support that macros?

    **bee please check your PM

    thanks
    All Help Very Much Appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width