Please help newbie with Borland Compiler and simple code!!

This is a discussion on Please help newbie with Borland Compiler and simple code!! within the C++ Programming forums, part of the General Programming Boards category; Ok I downloaded the borland compiler and now I open DOS Prompt and I type cd c:\borland\bcc35\bin then I type ...

  1. #1
    tranced
    Guest

    Please help newbie with Borland Compiler and simple code!!

    Ok I downloaded the borland compiler and now I open DOS Prompt and I type

    cd c:\borland\bcc35\bin

    then I type in

    bcc32 mycode.cpp

    When I do this I get it to compile but I get 2 errors...which I dont understand because its the code straight from this site.

    Code:
    #include <iostream.h>
    int main()
    {
      cout<<"HEY, you, I'm alive!  Oh, and Hello World!";
      return 0;    
    }
    Why doesn't this compile?

    Also, how do I make a .cpp file? I tried saving it in notepad and it didn't work? I had to edit one of the examples and change the code to the one i posted above.

    Is there something that I am missing that is making this not compile? All I want to do is learn how to do basic stuff?

    And also...when it does compile where does it go? Do I have to specify a path, or does it go into the Bin file in the Borland directory?

    Thanks!

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    61
    Ok first what are the two errors?

    Second, to make a cpp file you can either save it as a *.txt file and rename it to a *.cpp file or when your saving it type in the name plus the extension and put quotes around it.
    For ex:

    "mycode.cpp"

    this will make notepad save it with the extension cpp.

    Third, when you compile a file it just stays in the bin directory.

  3. #3
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Hey, I am a newbie too, and I would suggest going to bloodshed.net and downloading dev C++ which is a free compiler, it is a lot easier to use because you can edit your code and compile all in the same program. I started with these tutorials and They compiled fine.

  4. #4
    tranced
    Guest
    Well i got it to work but then I deleted it and downloaded Dev-C++...its so much better and user friendly. (Better for us newbs!!)

    Thanks anyway

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with simple piece of code
    By Furious5k in forum C++ Programming
    Replies: 10
    Last Post: 12-12-2008, 04:25 PM
  2. Newbie: Huge EXE files for simple programs - why?
    By Dominic in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 10-11-2002, 04:07 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum C Programming
    Replies: 0
    Last Post: 10-03-2002, 03:04 PM
  4. Newbie - MFC code from a book in VC++.Net
    By Guardian in forum Windows Programming
    Replies: 2
    Last Post: 04-27-2002, 07:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21