Thread: Borland

  1. #1
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949

    Borland

    Hello all, I'm new to C++ and using the Borland C++ compiler (new version). Where can I find a good programming site that uses code followed by the Borland Compiler? Thanks all!
    Do not make direct eye contact with me.

  2. #2
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    I'm not sure what you mean... any C++ code should be standard to any compiler. It shouldn't matter what code you use if it is written in ANSI standards.

  3. #3
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    hmm......must have been using C then....huh....anyway, what are some good C sites? Thanks again!
    Do not make direct eye contact with me.

  4. #4
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    well, I tried to compile this as test.c:

    Code:
    #include <iostream.h>
    
    int main()
    
    {
    
      cout<<"HEY, you, I'm alive!  Oh, and Hello World!";
    
      return 0;    
    
    }
    and I get these errors:
    Code:
    Error E2209 test.c 1: Unable to open include file "iostream.h"
    Error E2451 test.c 7: Undefined symbol 'cout' in function main
    BTW, the code is from this boards parent site, cprogramming.com.
    Do not make direct eye contact with me.

  5. #5
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    it shouldn't matter, but you should save your c++ files as "whatever.cpp"

    /edit... whoops... that was wrong.
    Last edited by ober; 02-28-2003 at 11:16 AM.

  6. #6
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    other than that, your code worked fine for me.... I'm using MSVC++ 6

  7. #7
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    I'll try using that.....where can I get it?
    Do not make direct eye contact with me.

  8. #8
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    The borland compiler will work once you get everything set-up properly and learn to use it. I know this can get frustrating.

    I've used several different compilers, and they have NEVER worked as expected the first time. (I think I tried-out the free Borland compiler once.)

    Usually, my problems have related to paths and directories... Either the compiler can't find the include files (this seems to be your case), or it couldn't find the cpp file, or I couldn't find the exe file.

    I'll try using that.....where can I get it?
    MSVC++ is Microsoft Visual C++. You have to buy it. The least expensive version is about $100. The microsoft compiler is probably the most popular non-free compiler, and Borland is probably the most popular free compiler. The nice thing about MSVC+ is that it runs in a windows IDE (Integrated Development Enviroment)... That is, it's not a "command line" compiler However, there are lots of configuration options. So, it's not easy for the first-time user to get "Hello World" working with MSVC++ either!

    must have been using C then
    Your code is C++. There's no cout in C

  9. #9
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    What version of the Borland Compiler are you using? Borland has a free compiler and a not for free IDE (Borland C++ Builder) that has the free compiler bundled in it and is the equivalent of MS VC++.

    Your problem may be that the compiler you are using doesn't recognize .h for standard files. That is, it may follow the most up to date standards for C++. You could try leaving out the .h from this line:

    #include <iostream.h>

    If that works, you may also need to indicate a namespace. Although not recommended for more advanced programs, when getting started, the line:

    using namespace std;

    after the list if #includes should work for now.

    If you want a free IDE that has a fair amount of approval look up Bloodshed Dev C++. I've had some problems with it, but overall it works pretty darn good for a freebie IDE.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 10-03-2006, 04:48 PM
  2. THE END - Borland C++ Builder, Delphi, J Builder?
    By Davros in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 02-28-2006, 11:23 PM
  3. Visual C++ and Borland C++ Builder :: Breakdown
    By kuphryn in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 02-24-2004, 04:53 PM
  4. Problem with Borland 5.5
    By Gregthatsme in forum C++ Programming
    Replies: 2
    Last Post: 05-25-2003, 08:07 AM
  5. Borland C++ v.5 & Borland Turbo C++ 4.5
    By Unregistered in forum C Programming
    Replies: 0
    Last Post: 07-21-2002, 03:30 AM