1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Turbo C++

Discussion in 'Software Development' started by RAMAddict, Sep 14, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
    Hello. In school we use a program called Turbo C++ to compile C++. I looked for the program on the internet and I only can find the download for the really old one. Anyone know where I can get this? Or another good free C++ compiler?
     
  2. Chicon

    Chicon

    Joined:
    Jul 29, 2004
    Messages:
    6,650
    Hi RAMAddict,

    It seems that Borland has not released a most recent version of Turbo C++.
    Instead of using Turbo C++ at home, you may use Dev C++ free download from
    http://www.bloodshed.net/devcpp.html
    It works nicely. (y)
     

    Attached Files:

  3. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
  4. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
    Any other compilers other than Dev C++ because that program keeps giving me errors and it won't run correctly when I write a simple Hello World program.
     
  5. jamesh2923

    jamesh2923

    Joined:
    Aug 22, 2004
    Messages:
    135
    RAMAddict,

    Although Turbo C++ is a little long in the tooth, it is an excellent compiler.
    And, as a learning tool really very good.

    A version of Turbo C++ is included with DiskTutor C++.

    Check EBay for someone willing to sell their copy of Turbo C++.

    The other thing to do is buy MS Visual Studio which will allow the development
    of high grade C++ based Windows apps. MSVS also has an excellent tutorial.
     
  6. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
    any other free compilers anyone knows about? what do you guys use? I really would like to find one. Please help. I tried searching google and I didn't find any good ones. Dev C++ doesn't read certain syntax's and stuff sometimes. Anyone else know any other ones?
     
  7. IMM

    IMM

    Joined:
    Feb 1, 2002
    Messages:
    3,257
    http://www.thefreecountry.com/compilers/cpp.shtml

    For windows the borland is good but is command line and you will have to add your own IDE - there are several out there which work with it

    It depends on your level and what you need
    Digital Mars might be a thought ?
     
  8. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
    well I'm just beginning with C++ in school we use Turbo C++ and that program seems very simple to work with. Dev C++ looked good but it has syntex problems and junk.
     
  9. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
    ok whats wrong with this simple hello program?
    I know for a fact that its correct but Dev C++ has a problem with it.

    //My first C++ Program
    #include<iostream.h>
    main()
    {
    cout<<"Hello World";
    return 0;
    }
     
  10. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    It's not correct.

    MinGW (the compiler DevC++ uses) doesn't allow you to get away with specifying main without an int type and using deprecated headers. Also the return line is not needed at the end of a c++ program. When main() completes its tasks, things in it are automatically destructed, so although you can explicitly specify the return line, there's no need to. Also, whenever possible, end your cout stream with an endl to flush the stream buffer.

    Here.

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main() {
        cout << endl << "Hello World!" << endl;
    }
    
     
  11. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189

    I learned that in school. We used Turbo C++ and thats what he tought us and it worked.
     
  12. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    I'm in no way a "know-it-all" and don't want to come off like that, but he is starting you off with bad, bad habits that you'll only get away with if the compiler lets you.

    If your instructor/teacher truly doesn't know how to do it properly(appears that way), you can show him the proper way to do it. Any good instructor/teacher will take a look at what you present to them, investigate it and decide if it is truly correct.

    If your instructor requires you to have the return line just add it to my first example.

    Or, at least do it like this (without the using namespace std line)

    Code:
    #include <iostream>
    
    int main() {
        std::cout << std::endl << "Hello World" << std::endl;
        return 0;
    }
    
    A thing to keep in mind with programming.

    Just because it works/compiles, doesn't mean it's right.

    Also, keep in mind iostream.h is not even an existing file in modern compilers anymore. iostream (no extension) is what you use.

    You can also goto http://www.nuwen.net/ and see what I mean. The first things posted show the proper way to do it.
     
  13. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
    Oh, so how do I know whats right? I mean I thought I would be learning the correct stuff in class. Its an Intro to C++ class.

    See in here:
    http://cprogramming.com/compiler.html

    It shows the way I did it except it has int main() like you said.

    Hmmmm.
     
  14. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    Read http://www.cplusplus.com/doc/ansi/hfiles.html .

    That will explain.

    At the bottom, on the right, is the ancient way of doing things, which you want to avoid.

    It's 2004, use the method on the left.

    (If you were wondering if the missing int was your main problem; yes it was.)
     
  15. RAMAddict

    RAMAddict Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    189
    Thank you. I will look through it. I'm not saying your wrong or anything I'm just confused and I want to see which is the correct way and junk like that. Do you use Dev C++?
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/273975

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice