LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2013, 05:08 AM   #1
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Rep: Reputation: 25
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?
 
Old 11-22-2013, 07:38 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 11-23-2013, 05:12 AM   #3
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
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.
 
Old 11-23-2013, 06:30 AM   #4
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
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.
 
Old 11-26-2013, 02:15 AM   #5
bknapek
LQ Newbie
 
Registered: Dec 2009
Distribution: Slackware
Posts: 18

Rep: Reputation: 1
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++: iostream or iostream.h? shifter Programming 4 10-17-2013 01:18 PM
[SOLVED] iostream.h exists, yet facing "iostream.h: No such file or directory" mq15 Linux - Software 13 01-02-2010 09:13 AM
what package is iostream.h in? bio71 Programming 3 09-11-2008 10:11 PM
Linux iostream vs Windows iostream davidguygc Programming 2 05-13-2007 09:13 PM
where is iostream invisibleghost Programming 2 10-24-2004 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration