Thread: Borland C++ 5.02 and the "left" spec.

  1. #1
    Registered User johnnyd's Avatar
    Join Date
    Mar 2002

    Angry Borland C++ 5.02 and the "left" spec.

    Gentle people,

    I have yet another Borland C++ 5.02 problem (at least until I install BCPP 6). I've search the entire forum and the FAQ and both have come up dry.

    Take the following code:

    cout<<left<<setw(30)<<"Frank Borland is a jerk."<<endl;
    That is supposed to work right? In Borland CPP 5.02, it doesn't. Even when iomanip.h is included. I get the error:

    Error: Undefined symbol 'left'
    Note, I've even tried adding this:

    using std::left;
    And I get this error:

    Error: 'left' is not a member of 'std'
    I've seen this used in so many resources, including Deitel and Deitel's "C++ How to Program". These don't work for me.

    What gives? Anyone here uses Borland C++ and have an idea of what is going on?

    Thanks for your help in advance.
    Excuse me, while I water my money tree.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Ontario, Canada
    I don't know why that wouldn't work, but you can always try:
    cout.setf( ios::left );
    cout<<setw(30)<<"Frank Borland is a jerk."<<endl;
    Are you including <iostream> or <iostream.h>? If you're using <iostream.h>, try <iostream> and see if that works.
    Last edited by XSquared; 03-08-2003 at 10:32 PM.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed