Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm learning C++ and are currently for some weeks without consistently working Internet connection. I search a (ASCII) terminal searchable & readable C++ documentation. Today I e. g. searched for c_str() reference and couldn't find anything in Ubuntu default man pages.

I'm thankful for any tips and hints

share|improve this question
If this is just generically "where can I download a C++ reference", it might be better off on stackoverflow. But if you specifically want one on Ubuntu, perhaps it's ok here. – poolie Sep 19 '11 at 22:13
up vote 9 down vote accepted

You can install libstdc++6-4.5-doc to get the manuals for the GNU c++ library, and then man std_basic_string tells you about the contents of that class.

You may ask: how should I know to look in that particular manpage? Well, what you want is the -k (keyword) argument to man:

mbp@joy% man -k c_str
std_basic_streambuf (3cxx) - (unknown subject)
std_basic_string (3cxx) - (unknown subject)
std_basic_stringbuf (3cxx) - (unknown subject)
std_basic_stringstream (3cxx) - (unknown subject)

and then you can ask man for one of those particular pages.

Or, of course, if you search the web (more thoroughly than I did), you might be able to find a PDF of the standard library definition.

share|improve this answer
I found another useful way to integrate documentation into my preferred IDE:… – Paradiesstaub Jul 29 '12 at 13:41

Take a look at c++-annotations, which comes in a number of different formats, and is available from the software center.

share|improve this answer
I installed it using the USC natty and can't find it. How can I start it? I feel little bit stupid asking this question... – Klau3 Sep 19 '11 at 22:47
You don't "Start" it :). The docs are usually in /usr/share/c++-annotations (if I remember correctly). – RolandiXor Sep 19 '11 at 22:52
But in general, how do you find documentation you installed? There's a bit of a gap, but in general either run yelp (a doc viewing gui) or just look in /usr/share/doc. Would be nice if it came up in the menu. – poolie Sep 19 '11 at 23:58
I added an alias to my global bashrc → alias c='less /usr/share/doc/c++-annotations/cplusplus.txt.gz' – Klau3 Sep 20 '11 at 8:11

C/C++ reference residing at can be downloaded as an archive of HTML pages:

Although this thread is quite old, this link might be useful for others who find it in SERP (as I did).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.