Compiler

What compiler do I need to build and run #include <iostream.h> type of header?
The only one I know is Turbo C++, but why do you want to use such old stuff(30+ years) ?????
This sounds like a solution you've come up with to a problem that you shouldn't have; you're trying to compile code that was written 30 years ago, but you've got a modern compiler?

The better fix here is not to find a compiler from 30 years ago that you can use; it's to understand the code you're trying to build and update it.
? I havent had any trouble compiling <.h> includes on modern compilers. Am I not understanding something? We see people using <math.h> all the time in here and it compiles just fine. Might be a compiler flag on some compilers to allow it, not sure. What did you use that did not work?
jonnin, math.h only works because that's what the actual header file was called in C, so it's still there for compatibility. C never had iostream.h, iostream.h was only a pre-standardization-of-C++ feature.

It will not work on modern compilers,
1
2
3
// Example program
#include <iostream.h>
int main() { }

2:22: fatal error: iostream.h: No such file or directory
compilation terminated.
Last edited on
...but if you had a copy of them...would a modern compiler work with them?
...but if you had a copy of them...would a modern compiler work with them?

Probably not. The pre-standard headers and implementations were usually quite different than what actually became standard. Especially if you're dealing with the Borland headers and implementations since they lost the "fight" to have their versions used as the standard versions. All the major compilers at the time lost out on some aspect in the standardization with bits and pieces taken from different implementations. By the way Borland's loss was the primary reason they got out of the compiler business since it would have taken a major re-write of their compiler to get it support the new fangled standard.

My memory is failing me, I'm trying to remember the name of the 'standard' I used to get back in the day. I have a feeling it was from Australia. I'm wondering if I still have a backup of it anywhere...I recently found a copy of Metrowerks CodeWarrior.

Edit:
Dinkumware...not Australian but sounds like it should be. :0)
Last edited on
Repeater. Thanks for that but Im a beginner and I was trying to run this Periodic Table of Elements program and it has some 1400 line of codes which was created on August 2008 and I just want to see how it works so that I can make one from that instead of using that as mine.
Would it be possible to post the code somewhere?
Maybe it would be possible to update the code without too much effort so a modern compiler could compile it.
> I was trying to run this Periodic Table of Elements program and it has some 1400 line of codes which was created on August 2008
If it's including iostream.h, it's a lot older than 2008.

You don't need to be able to compile and run it just to be able to get the feel for the program and how it works, just to be able to write your own from scratch.

It might be a good example of how NOT to write a program.
salem c wrote:
If it's including iostream.h, it's a lot older than 2008.

Not necessarily. Just because something is old doesn't mean people are not still using it.
Last edited on
Not necessarily. Just because something is old doesn't mean people are not still using it.


Although I must say, the number of people asking how they can get Turbo C++ 3 running on Windows 10 has lessened over the last year. Maybe people are finally moving on from that particular 27 year old compiler/IDE.
Registered users can post here. Sign in or register to post.