Other headers #included via <iostream>

Discussion in 'C++' started by zerotyNONONOTHERESNOSPAMMING!type@yahoo.com, Jul 19, 2005.

  1. Hi,

    As most of you probably already know, depending on which
    implementation of C++ you have, #include <iostream> may cause various
    other headers to be #included too. (I've observed cstring, cstdio,
    cmath and I think cstdlib in g++)

    Are there any that the standard requires to be "dragged in" like this
    regardless of implementation?

    Thanks,

    James M.
     
    zerotyNONONOTHERESNOSPAMMING!, Jul 19, 2005
    #1
    1. Advertising

  2. zerotyNONONOTHERESNOSPAMMING! wrote:
    > As most of you probably already know, depending on which
    > implementation of C++ you have, #include <iostream> may cause various
    > other headers to be #included too. (I've observed cstring, cstdio,
    > cmath and I think cstdlib in g++)
    >
    > Are there any that the standard requires to be "dragged in" like this
    > regardless of implementation?


    No. You need to include the headers that declare/define what you intend
    on using. The Standard only requires that multiple inclusion of the same
    header does no harm.

    V
     
    Victor Bazarov, Jul 19, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Tiger
    Replies:
    10
    Views:
    5,665
  2. ai@work
    Replies:
    9
    Views:
    567
    Ron Natalie
    Dec 16, 2004
  3. S. Nurbe

    iostream + iostream.h

    S. Nurbe, Jan 14, 2005, in forum: C++
    Replies:
    7
    Views:
    804
    red floyd
    Jan 15, 2005
  4. red floyd
    Replies:
    3
    Views:
    555
    Dietmar Kuehl
    Mar 8, 2005
  5. , India
    Replies:
    3
    Views:
    2,972
    James Kanze
    Nov 13, 2010
Loading...

Share This Page