iostream.h

This is a discussion on iostream.h within the C++ Programming forums, part of the General Programming Boards category; I just had a good laugh when I looked through iostream.h (Dev-Cpp\include\C++.4.2\ backward ). It turns out, this is all ...

  1. #1
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269

    Talking iostream.h

    I just had a good laugh when I looked through iostream.h (Dev-Cpp\include\C++\3.4.2\backward). It turns out, this is all it is doing for C++:

    Code:
    // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
    //
    // This file is part of the GNU ISO C++ Library.  This library is free
    // software; you can redistribute it and/or modify it under the
    // terms of the GNU General Public License as published by the
    // Free Software Foundation; either version 2, or (at your option)
    // any later version.
    
    // This library is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    
    // You should have received a copy of the GNU General Public License along
    // with this library; see the file COPYING.  If not, write to the Free
    // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
    // USA.
    
    // As a special exception, you may use this file as part of a free software
    // library without restriction.  Specifically, if other files instantiate
    // templates or use macros or inline functions from this file, or you compile
    // this file and link it with other files to produce an executable, this
    // file does not by itself cause the resulting executable to be covered by
    // the GNU General Public License.  This exception does not however
    // invalidate any other reasons why the executable file might be covered by
    // the GNU General Public License.
    
    #ifndef _BACKWARD_IOSTREAM_H
    #define _BACKWARD_IOSTREAM_H 1
    
    #include "backward_warning.h"
    #include <iostream>
    
    using std::iostream;
    using std::ostream;
    using std::istream;
    using std::ios;
    using std::streambuf;
    
    using std::cout;
    using std::cin;
    using std::cerr;
    using std::clog;
    #ifdef _GLIBCXX_USE_WCHAR_T
    using std::wcout;
    using std::wcin;
    using std::wcerr;
    using std::wclog;
    #endif
    
    using std::ws;
    using std::endl;
    using std::ends;
    using std::flush;
    
    #endif
    
    // Local Variables:
    // mode:C++
    // End:
    That is all I have to say to you anti-standard guys around here.
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by SirCrono6
    I just had a good laugh when I looked through iostream.h (Dev-Cpp\include\C++\3.4.2\backward). It turns out, this is all it is doing for C++:
    In at least one of many implementations. What's the point you are trying to make? The compiler is also free to simply error out and inhibit compilation.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    What did you want the compiler to do? Rewrite iostream.h with all of the classes and methods in a global scope?

    This is a modern compiler that contains the modern <iostream>, they wrote their version of it, then when they write the depreciated headers, they just apply the modern library and warn that it won't nessassarily work in the future. They don't mean their version they wrote up, they mean the original depreciated version.

    Here is a nice old version of iostream.h for you to take a look at:
    http://www.mit.jyu.fi/vesal/kurssit/cpp/bc31/IOSTREAM.H
    and another
    http://www.opensource.apple.com/darw...bio/iostream.h
    Last edited by SlyMaelstrom; 02-02-2006 at 09:44 PM.
    Sent from my iPadŽ

  4. #4
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    I suppose it makes sense; it just wasn't what I was expecting.
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  5. #5
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    viva iostream.h!
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Including iostream.h
    By DvdHeijden in forum C++ Programming
    Replies: 7
    Last Post: 01-15-2005, 11:23 AM
  2. iostream.h (vs) iostream
    By Brain Cell in forum C++ Programming
    Replies: 5
    Last Post: 11-05-2004, 07:20 AM
  3. Depreciated/antiquated iostream.h
    By ThePyro in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 04-26-2004, 01:23 PM
  4. iostream.h problems
    By UniqueScreenNam in forum C++ Programming
    Replies: 9
    Last Post: 11-11-2002, 11:34 AM
  5. stdio.h vs iostream.h
    By Hiroyuki in forum C Programming
    Replies: 2
    Last Post: 03-13-2002, 08:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21