473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

#include standard

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
2 1921
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: John Tiger | last post by:
Can anybody have idea about the difference between #include <iostream.h> and #include <iostream>. Is later one valid statement on any compiler. I tried compiling on MSVC second statement give...
3
by: skumar | last post by:
I am a newbie with C++ and unable to understand this warning/error message : localhost > g++ -Wall j++.cpp In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, from j++.cpp:2:...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
2
by: Rakesh | last post by:
Hi, I was writing this C++ program wherein I used an include statement like - #include <iostream.h> I was told by my co-worker that this form of including a file is deprecated and should...
4
by: Exits Funnel | last post by:
Hello, I'm slightly confused about when to use parens around #included files and when to use angle brackets. I understand (I think) that the difference is that the compiler will search in its...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
12
by: Francois Grieu | last post by:
Can #include safely use a preprocessing token, as in #define HEADERFILE "stdio.h" #include HEADERFILE int main(void) {return printf("Hello, world\n")*0;} TIA, François Grieu
7
by: Gabriel | last post by:
Hi I have heard that is advisable/advantageous to #include the standard headers (<header>) before your own headers ("header.hpp") in your source file. Is this true? If it is: why is this so? ...
111
by: Nate | last post by:
Hello, I am looking for a method to automatically declare variables in C. I'm not sure if there is a good way to do this, but I had something like this in mind... int i; for(i = 1; i < 4;...
6
by: Ole Nielsby | last post by:
The standard doesn't define this but what conventions do projects use? As I understand it, #include <somelibrary.h> is used for including system headers and those of frameworks such as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.