#include standard

Discussion in 'C++' started by Web Developer, Aug 8, 2003.

  1. Hi,

    In Java, the package java.lang.*; is automatically imported and provides a
    basic set of functionality.

    Questions:
    1) In C++, are there any include files that are automatically included? or
    must I explicitly define one if i want to use a method from a particular
    include file?
    2) Where can I find a source for all include files? something that shows the
    code and what methods are available etc.. since there is no API like there
    is in Java.


    WD
     
    Web Developer, Aug 8, 2003
    #1
    1. Advertising

  2. Web Developer

    Jerry Coffin Guest

    In article <>, says...

    [ ... ]

    > 1) In C++, are there any include files that are automatically included?


    No.

    > or must I explicitly define one if i want to use a method from a particular
    > include file?


    You must explicitly include it. Defining it would be something else
    entirely.

    > 2) Where can I find a source for all include files? something that shows the
    > code and what methods are available etc.. since there is no API like there
    > is in Java.


    The C++ standard has definitions of what's required to be present in all
    the standard headers. There are also a number of placed on the web
    (e.g. at dinkumware.com) that have reference material.

    Headers specific to your platform are presumably documented by the
    implementation, though with no knowledge of the implementation it's hard
    to guess at the form that might take.

    --
    Later,
    Jerry.

    The universe is a figment of its own imagination.
     
    Jerry Coffin, Aug 8, 2003
    #2
    1. Advertising

  3. "Web Developer" <> wrote...
    > In Java, the package java.lang.*; is automatically imported and provides a
    > basic set of functionality.
    >
    > Questions:
    > 1) In C++, are there any include files that are automatically included?


    There are no "include files" in C++ (except those you create yourself).
    There are headers. And, no, none is automatically included.

    > or
    > must I explicitly define one if i want to use a method from a particular
    > include file?


    If you need a certain library element and that library element is declared
    in a certain header, you have to #include that header.

    > 2) Where can I find a source for all include files?


    Again, there are no "include files". However, the standard headers are
    in fact files (although they are not required to be files by the language)
    on all implementations I've seen so far. Consult with your compiler
    documentation to know where it puts its library.

    > something that shows the
    > code and what methods are available etc.. since there is no API like there
    > is in Java.


    There is API. Look in your compiler documentation and you will see that.

    Victor
     
    Victor Bazarov, Aug 8, 2003
    #3
    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. Danny Anderson
    Replies:
    5
    Views:
    529
    Victor Bazarov
    Aug 15, 2003
  2. Rolf Magnus
    Replies:
    2
    Views:
    628
    Karl Heinz Buchegger
    Nov 28, 2003
  3. Elie Nader
    Replies:
    1
    Views:
    665
  4. Aguilar, James
    Replies:
    2
    Views:
    725
    Aguilar, James
    Jul 16, 2004
  5. Andreas Bogenberger
    Replies:
    3
    Views:
    1,003
    Andreas Bogenberger
    Feb 22, 2008
Loading...

Share This Page