iostream.h: g++ 3.4.6 vs. g++ 4.7.1
I just installed Slackware64 vers 14 on my new machine and I copied over a bunch of programs I've written over a few decades from another machine running Slackware vers 11. I was not surprised to discover the programs don't run because the link libraries are different but I was surprised to find many of the programs won't compile due to a "missing" <iostream> or <iostream.h>.
Am I doing something wrong or has the language changed that much in seven years? |
Yes, it is now just iostream
That's part of the ISO C++ standard, derived I think back in 1998. There was obviously some number of years where it continued to be used; however I'm sure now it has been deprecated fully. 2012 Draft Standard I'm sure there may be a more recent copy, this is just one of the first search results that popped up. |
So you're saying they changed the ***** language? How the *** are we to write and maintain code if they move the **** goal posts? That makes me mad. SO can anyone tell me what has replaced these streams? Or is there a legacy flag that can be set? I loved C when K&R did it but MicroSofting it so it goes obsolete every year stinks.
|
Okay, the problem wasn't that <iostream> was lost, it was that i needed "using namespace std;" which was not required by compilers when the code was written. I still hate having to go back and update hundreds of programs I've written over the years but I guess it can't be helped. Thnx rtmisler for your reply. I looked at the Standard you mentioned but found it difficult to read.
|
Exactly. I was also suprised by this recently.
The "namespace" was introduced into the standard back in 1995, but went unnoticed for years, until it became mandatory. |
All times are GMT -5. The time now is 11:52 PM. |