Turbo C++

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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?
 

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.
 
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.
 

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?
 

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.
 

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;
}
 
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;
}
 

RAMAddict

Thread Starter
Joined
Jul 6, 2004
Messages
189
RAMAddict said:
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;
}

I learned that in school. We used Turbo C++ and thats what he tought us and it worked.
 
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.
 

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++?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top