How to install C++ Man Pages (Documentation) in Ubuntu/Linux?

Posted by Joys of Programming on in C/C++

It’s so easy to search for any C related programming functions. All you need is to search the man pages. Take for example, if you want to know more about printf, simply type

$ man 2 printf

But that’s not the case with C++ functions. Every time, you have to go to the web for any doubts related to C++ functions. There are two ways by which you can search for documentation related to C++ functions.

  1. Man pages for C++ functions
  2. HTML documentation

Both of the above are available from a single package. To install C++ documentation

$ sudo apt-get install libstdc++6-4.4-doc

This installs both the man pages and HTML documentation.
The HTML documentation is found in the following path: file:///usr/share/doc/libstdc++6-4.4-doc/libstdc++/html/index.html

If you are struggling to search C++ man pages, Refer How to search C++ man pages
Now there may be case that when you are referring this article the documentation 6.4.4 version is no longer available.

In that case, follow the following steps

$ apt-cache search libstdc++|grep "doc"
libstdc++6-4.4-doc - The GNU Standard C++ Library v3 (documentation files)
libstdc++6-4.1-doc - The GNU Standard C++ Library v3 (documentation files)
libstdc++6-4.3-doc - The GNU Standard C++ Library v3 (documentation files)

Search for the libstdc++ docs as shown above and install the version you want, preferably the latest ones (as shown above)

$ sudo apt-get install libstdc++6-4.4-doc



Tags: , ,

Comments:

1 Comment

  • Eugen says:

    Thank you for sharing this info.
    I have struggle to find a way to get a complete “man pages” for stdc++, this was the only valuable tip I found so far :o )

    Keep up the good work!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.