By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 2,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

#include standard

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <3f********@news.iprimus.com.au>, no****@hotmail.com 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.
Jul 19 '05 #2

P: n/a
"Web Developer" <no****@hotmail.com> 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
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.