Best C++ compiler

comp@ddict

Level F
So we use the ancient TurboC++ IDE on our WinXP PCs on the computer lab.

But I have a Win7 laptop, and I don't want to use DOSBOX to use that old software.

I downloaded MS Visual C++ but after writing a program, it says <iostream.h> doesn't exist.

And I downloaded a emulated TurboC++ program, which gives error for anything complicated than addition and subtraction.

Can I HAZZZZ a C++ compiler for Windows 7 which works the way TurboC++ works on Windows XP(probably with a better, more 201x interface and all that)
 
+1 for DevCpp,If you need a simple GUI IDE then get DevCpp like #CA50 said.

Other options are,

1.Visual Studio C++ 2010 Express (complicated)

2.g++ - MinGW (command line)

EDIT: Haven't tried code::blocks but if DevCpp is not updated you should get that.CodeBlock and DevCpp are both IDEs based on gcc.
 
Use MS Visual C++ , which you have already downloaded which should be sufficient for you. The latest version have removed old <iostream.h> etc...

So instead of including <iostream.h> , <vectors.h>, include <iostream> <vectors> i.e. without the .h extension.

The old iostream library was removed beginning in Visual C++ .NET 2003.

The main difference between the Standard C++ Library and previous run-time libraries is in the iostream library. Details of the iostream implementation have changed, and it may be necessary to rewrite parts of your code that use iostream if you want to link with the Standard C++ Library.


You will have to remove any old iostream headers (fstream.h, iomanip.h, ios.h, iostream.h, istream.h, ostream.h, streamb.h, and strstrea.h) you have included in your code and add one or more of the new Standard C++ iostream headers (<fstream>, <iomanip>, <ios>, <iosfwd>, <iostream>, <istream>, <ostream>, <sstream>, <streambuf>, and <strstream>, all without the .h extension).

Source:

http://msdn.microsoft.com/en-us/library/8h8eh904(v=vs.80).aspx
 
Cause borland compiler is not supported now....and few syntax changes are there on gc++

Sent from my ZTE-BLADE using Tapatalk
 
Okay, but it's showing numerous other errors which weren't showing on the TC++ on WinXP back in my comp lab(exact same code written!)

+1, When I started using it gave error clrscr()
<
? Then after tinkering I found out that instead of clrscr(), void clrscr() has to be written.
<


Also, I created a project named "hello world", and to my amusement, it automatically wrote the whole program correctly!! (I didn't write a single line) I was like "bada mast compiler hai"
<


#comp@ddict - The emulated version doesn't supports ctrl + break
<
Although it works fine for me.
<
 
Better get used to VC++ and try follow the latest standrards.

If it is giving error with your code, it is highly probable your are using some syntax which have been depreciated in latest C++ standard.

Although you might think this as an unnecessary issue,this will certainly help you in long run.
 
Using TurboC++ isn't a good idea. Its no where used.

MS products used widely - so learn the conventions of any version. 2008 or later would be good of course.

For linux, gcc(g++) is enough.
 
Better get used to VC++ and try follow the latest standrards.

If it is giving error with your code, it is highly probable your are using some syntax which have been depreciated in latest C++ standard.

Although you might think this as an unnecessary issue,this will certainly help you in long run.

This makes complete sense. Perhaps you were not aware that it is a legitimate issue you are facing, but changing compilers in your case is not the right solution. Have a look at what has changed between the old & new standards related to the #include directive. Have a look at your include path as well.

Cheers!
 
Okay, but it's showing numerous other errors which weren't showing on the TC++ on WinXP back in my comp lab(exact same code written!)

+1, When I started using it gave error clrscr()
<
? Then after tinkering I found out that instead of clrscr(), void clrscr() has to be written.
<


Also, I created a project named "hello world", and to my amusement, it automatically wrote the whole program correctly!! (I didn't write a single line) I was like "bada mast compiler hai"
<


#comp@ddict - The emulated version doesn't supports ctrl + break
<
Although it works fine for me.
<

Turbo C/C++ includes many non-standard functions for the purpose of helping the programmer from (re)inventing commonly used functionality. 'clrscr' happens to be one of those non-standard functions.

I remember seeing a bunch of such non-standard funcitons with 'dos', 'bios' and '_'(underscore) prefixes in the help files ages ago. However I also remember the help files were very clear on documenting that these were not standard functions. If I remember right, the standard functions had a 'ANSI' tag in the helpfile docs, while the non-standard functions did not have the 'ANSI' tag.

In short, your code is non-standard, which is why the other compilers are complaining. You need to brush up on ANSI/ISO C/C++.

BTW, I believe when you modified your code to 'void clrscr();', you didn't actually use this function, rather you put a function prototype.
 
Turbo C/C++ includes many non-standard functions for the purpose of helping the programmer from (re)inventing commonly used functionality. 'clrscr' happens to be one of those non-standard functions.

I remember seeing a bunch of such non-standard funcitons with 'dos', 'bios' and '_'(underscore) prefixes in the help files ages ago. However I also remember the help files were very clear on documenting that these were not standard functions. If I remember right, the standard functions had a 'ANSI' tag in the helpfile docs, while the non-standard functions did not have the 'ANSI' tag.

In short, your code is non-standard, which is why the other compilers are complaining. You need to brush up on ANSI/ISO C/C++.

BTW, I believe when you modified your code to 'void clrscr();', you didn't actually use this function, rather you put a function prototype.

All this was in dev c++, not in turbo. And yeah I just just modified.
 
I would suggest that you guy's stick to industry standard compilers like Microsoft C++ or gcc. Forget the old 16 bit compilers like Turbo C++ 2/3. Don't get used to programming on those compilers as its utterly useless. People often come to interviews equipped with programming skills picked up using an old and non standard compiler like this and quite often get rejected due to not being up to date on language specs. Get used to a modern and standards based 32bit/64bit compiler.
 
Back
Top