Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
1  
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
add comment

2 Answers

up vote 8 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: shinnok.com/rants/2011/07/19/… –  Paradiesstaub Jul 29 '12 at 13:41
add comment

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
1  
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
1  
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
add comment

Your Answer

 
discard

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.