Thread: Getting Borland's C++ Builder to work with the ANSI standard.

  1. #1
    Utter insanity
    Join Date
    Jan 2004
    Posts
    19

    Getting Borland's C++ Builder to work with the ANSI standard.

    Hello. I have the Borland C++ Builder 6.0. I've been trying to learn how to program; but unfortunately; Borland isn't compatible with the ANSI standard! I've changed settings and changed settings; used foul words in multiple languages; and played "Ghostbusters' on my C64... nothing's worked; no matter how bizzare. I shudder to think how sorry Microsloth's C++ IDE is; if Borland is incapable of making a working IDE. Does anyone know how to get it to work? Thanks in advance.
    "I merely took the energy it takes to pout and wrote some blues." - Duke Ellington

  2. #2
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    Hmm, what do you mean by nothing works?
    You can't compile?
    Or you can compilation errors?
    Or you can't find certain files?

    I shudder to think how sorry Microsloth's C++ IDE is
    It's spelt Microsoft.

  3. #3
    Utter insanity
    Join Date
    Jan 2004
    Posts
    19
    #1 It's v5; not 6. Oops.

    A small sample program from a book using the ASCI standard (Sam's Teach Yourself C++ in 21 Days 3rd Ed.) refuses to do more than waste a miniscule amount of hard drive space. I can't get it to compile. Which either means a) Sams makes MS look good; and the BBB should have a warnign about purchasing their books; or b) Borland has some internal problem; either similar to the usual stuff that plauges MS; or a settings error due to the fact they want you to use THEIR version of C++. Which would mean I'd have to buy yet another book. Or call the couple hundred dollars I've spent on all this crap a waste; and go find a decent C IDE online. I seem to recall running across one when I was looking for something for C++.

    And the way MS runs things; I can say far more accurate but impolite words (to say the least) about them. Nothing they have ever produced has been worth the weight of a coke can in scrap.
    "I merely took the energy it takes to pout and wrote some blues." - Duke Ellington

  4. #4
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    Originally posted by Dante Shamest
    It's spelt Microsoft.
    Not in knowledgeable circles
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  5. #5
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    >>the BBB should have a warnign about purchasing their books
    The BBB may not have any warnings about that, but if you ask at almost any programming forum, you'll get plenty of warnings.
    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

  6. #6
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    You aren't being very specific...What problems are you having? I have the Sam's book and haven't had any trouble compiling the code. You could always try Dev-C++ for a free IDE/compiler
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  7. #7
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    I seem to recall running across one when I was looking for something for C++.
    Two excellent free IDEs.

    Dev-C++

    MinGW Developer Studio

    And the way MS runs things; I can say far more accurate but impolite words (to say the least) about them. Nothing they have ever produced has been worth the weight of a coke can in scrap.
    I hope you're not using Windows then?
    I find it amusing how people diss Microsoft and then use their products. Heck, you probably use IE to post too.

  8. #8
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Originally posted by domhnall4h
    And the way MS runs things; I can say far more accurate but impolite words (to say the least) about them. Nothing they have ever produced has been worth the weight of a coke can in scrap.
    HEY DUDES MICROSOFT HASNT DONE ANYTHING GOOD EVER AND THEY SUCK. IM COOL CUZ I H8 MICROSOFT. OOPS I MEAN MICRO$OFT <-- LOLZ I USED A DOLLAR SIGN

  9. #9
    Registered User
    Join Date
    Sep 2003
    Posts
    135
    domhnall4h, please post the exact code you're trying to compile, and tell us precisely what error messages you get when you try.

    Do either of the following compile successfully:

    Code:
    #include <iostream.h>
    
    int main()
    {
        cout << "Hello, world" << endl;
        return 0;
    }
    or:

    Code:
    #include <iostream>
    
    int main()
    {
        std::cout << "Hello, world" << std::endl;
        return 0;
    }

  10. #10
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    I used to use Borland C++ Builder 5.0 and 6.0. For what I remember, both versions of the development suite use the old ANSI standard, that is code looks like this:

    Code:
    #include <iostream.h>
    
    int main()
    {
        cout << "Hello, world" << endl;
        return 0;
    }
    Domhnall4h, I would consider reading the turorials on this site, because luckily for you they all work with C++ Builder just fine. Keep reading from Sams, but if something doesn't compile just check on these tutorials for different ways to write things.

    For example, if Sams says
    #include <iostream>
    using namespace std;

    Simply #include <iostream.h>, and forget the using namespace std thing.

    You'll find most of the files you #include will need to be followed by a .h, even when Sams says they dont.

    Don't give up on C++ Builder, it really is a remarkable rapid application development tool, and as far as I'm concerned is better than VB or any free C++ compiler (although its not up to scratch with MSVC++.

    The key to CBuilder is to remember its a tool for creating programs quickly, but not so much for learning how to program, or how to program according to standards (maybe a new version might comply with standards more?). However, thats not to say its not possible to do either in CBuilder.

  11. #11
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    Borland C++Builder is not meant to make "Hello, World!" programs. It is a Win32 only compiler.

    You should notice that the instant you open it up, as its interface is the exact same as Visual Basic.

    If you are trying to make normal C++ programs, use Borland C++ 5.02, Borland C++ 5.5, MingW, Dev-C++, and several other C++ compilers that are out there, just DON'T use Borland C++Builder. It is for Window ONLY.

    And, by the way, it is an EXCELLENT Win32 IDE. I love it.
    My Website

    "Circular logic is good because it is."

  12. #12
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    I shudder to think how sorry Microsloth's C++ IDE is; if Borland is incapable of making a working IDE.
    actually, MS VS .NET 2003 conforms to the ANSI standard more than gnu c, and I like the ide.

    And, by the way, it is an EXCELLENT Win32 IDE. I love it.
    I hear it has problems with certain libraries, most notably the directX libs, is there any merit to these claims or is it just lack of knowledge about the software itself as the original poster showed by his post.

  13. #13
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    There is nothing wrong with your compiler!

    I've never used "Builder", but...

    Builder will make a console application. Look-up console in the compiler's documentation. It should tell you how to set-up the compiler. If you are lucky, there will be a step-by-step example.

    A Win32 console application looks like a DOS application. It runs in a text-only window. True Win32 Windows applications require lots more "overhead" code.

    One thing to watch-out for, once you get the compiler to give you an exe file, is that the console application window will close when the program ends... faster than you can read "Hello World'. This is done by the operating system. Don't blame the program or compiler. See the cprogramming.com Programming FAQ for work-arounds.

    I've used a handful of different compilers, and I don't think any of them have worked as expected out-of-the box. There are always some set-up / configuration / usage "issues". This can be very frustrating, because you never know if you're getting close to the solution. When I first tried-out MSVC++, it tried to write lots of code for me (the Win32 overhead), with lots of // "Your code goes here" comments. I assume that Builder does the same thing. Selecting the correct options should turn-off this RAD (Rapid Application Development) "feature".

    Good luck.

    [EDIT]
    If you do give-up on Builder, check-out the list of free compilers at TheFreeCountry.com.
    Last edited by DougDbug; 01-13-2004 at 04:12 PM.

  14. #14
    Utter insanity
    Join Date
    Jan 2004
    Posts
    19
    Wow; I didn't expect to have such a response. I tried to post the code I was using last night; but IE pulled it's usual apparently; because I couldn't post. It is the 'Hello World" prog posted earlier. I noticed it starts up somewhat odd; never thought much of it. Thus far; my programming experience has been with the C64/128 and QBasic 4.5; so I wasn't aware that this isn't capable of building simple, non windos programs to start. I bought it for the sole reason that it was cheap; and I avoid MS products as often as possible. Thanks all. I'll try one of the freeware jobs tonight; and see how that works out. this is turning out to be almost as aggravating as rebuilding a transmission out of a car. A #$@! while your doing it; but great when the front end lifts off the ground due to the torque of a well tuned big block.
    "I merely took the energy it takes to pout and wrote some blues." - Duke Ellington

  15. #15
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    and I avoid MS products as often as possible
    But you use a compiler that only runs on windows, meaning your OS must also be windows

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bug in iterator comparison in C++ standard?
    By steev in forum C++ Programming
    Replies: 14
    Last Post: 07-12-2008, 12:02 AM
  2. Why does <conio.h> not work on my Mac? Non ANSI?
    By tvsinesperanto in forum C Programming
    Replies: 8
    Last Post: 03-17-2006, 07:04 PM
  3. Abstract Base Class and References
    By Thantos in forum C++ Programming
    Replies: 9
    Last Post: 10-13-2004, 01:35 PM
  4. The Bludstayne Open Works License
    By frenchfry164 in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-26-2003, 11:05 AM
  5. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM