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

c++ documentation

P: n/a
hi,

I wish to learn c++ from knowing c. i have documentation relating to c
library functions but what is the c++ equivalent and where can i find it?

Also, is there any restriction in using the libraries i am used to using in
c programs in c++ programs?

Thanks in advance.

Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"Jason" <ja***********@btinternet.com> wrote in message
news:bp**********@titan.btinternet.com...
| I wish to learn c++ from knowing c. i have documentation relating to c
| library functions but what is the c++ equivalent and where can i find it?
Some possible free documentation sources:
A free but out-of-date C++ standard defining all the libraries
can be found at: ftp://ftp.research.att.com/dist/c++std/WP/CD2/

The documentation of the library that comes with GNU C++
is available at:
http://gcc.gnu.org/onlinedocs/libstd...mentation.html

SGI STL: http://www.sgi.com/tech/stl/
Has an introduction, and docs for the algorithms and container library,
but nothing about the iostreams library.
Watch out for non-standard extensions that are included in
the documentation (e.g. all the hash_* containers are non-standard).

The online documentation of a commercially available library
can be found at http://www.dinkumware.com/refxcpp.html

For more general resources and books, see also my recent post:
http://groups.google.com/groups?selm...newshispeed.ch

| Also, is there any restriction in using the libraries i am used to using
in
| c programs in c++ programs?

No. But there are two key differences you need to take into
account to write standard-compliant C++ code:

1) #include <c*****> instead of <*****.h>
#include <cstdlib> // not #include <stdlib.h>
The C-header include will work on many platforms,
but is not portable.

2) All C library names (except a few macros) are in
the std C++ namespace. So you should write:
std::puts("hello"); //NOT: puts("hello");
Initially, you can remedy to this by adding a
single directive in your programs:
using namespace std; //rarely a good idea in real code
I hope this helps,
Ivan
--
http://ivan.vecerina.com
Jul 19 '05 #2

P: n/a
In article <bp**********@titan.btinternet.com>,
Jason <ja***********@btinternet.com> wrote:

I wish to learn c++ from knowing c. i have documentation relating to c
library functions but what is the c++ equivalent and where can i find it?


If you can afford to buy books, the standard references are:

Bjarne Stroustrup, "The C++ Programming Language". Get either the third
edition (paperbound) or the "special edition" (hardbound).

Nicolai Josuttis, "The C++ Standard Library".

If you can afford only one, get Stroustrup.

--
Jon Bell <jt*******@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
Jul 19 '05 #3

P: n/a
"Jon Bell" <jt*******@presby.edu> wrote in message
news:bp**********@jtbell.presby.edu...
In article <bp**********@titan.btinternet.com>,
Jason <ja***********@btinternet.com> wrote:

I wish to learn c++ from knowing c. i have documentation relating to c
library functions but what is the c++ equivalent and where can i find it?


If you can afford to buy books, the standard references are:

Bjarne Stroustrup, "The C++ Programming Language". Get either the third
edition (paperbound) or the "special edition" (hardbound).

Nicolai Josuttis, "The C++ Standard Library".

If you can afford only one, get Stroustrup.


I have both of those books, and agree with Jon.

If you buy online, see amazon.co.uk (I'm assuming you're in the uk from your
email), they have both of those books at 50%. That's where I got mine.

--
Derek
Jul 19 '05 #4

P: n/a
Ivan Vecerina wrote:
The documentation of the library that comes with GNU C++
is available at:
http://gcc.gnu.org/onlinedocs/libstd...mentation.html


Does gcc come with man pages documenting the C++ libraries? Can one
type man 3 iostream as one would type man 3 stdio?

Jul 22 '05 #5

P: n/a

"Grumble" <in*****@kma.eu.org> wrote in message
news:bp**********@news-rocq.inria.fr...
Ivan Vecerina wrote:
The documentation of the library that comes with GNU C++
is available at:
http://gcc.gnu.org/onlinedocs/libstd...mentation.html


Does gcc come with man pages documenting the C++ libraries? Can one
type man 3 iostream as one would type man 3 stdio?


How hard could it be to actually visit gnu.org and do
a bit of reading to find out?

-Mike
Jul 22 '05 #6

P: n/a
>> Does gcc come with man pages documenting the C++ libraries?
Can one type man 3 iostream as one would type man 3 stdio?


How hard could it be to actually visit gnu.org and do
a bit of reading to find out?


Harder than simply asking here, that's for sure.

http://gcc.gnu.org/onlinedocs/libstd...mentation.html

In addition, an initial set of man pages are also available in
the same place as the HTML collections. Start with C++Intro(3).

ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/

Now I'm happy :-

Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.