Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the man pages for C++? [closed]

Does documentation for C++ exist in Linux? I want something like the man pages of C. For example, docs for string, stl, iostream, ifstream, etc.?

like image 427
fpointbin Avatar asked Mar 14 '11 01:03

fpointbin


People also ask

Where are man pages stored Linux?

The man pages are stored in /usr/share/man.

How do I see all man pages?

To see the most MACHO man page ever created use man man which will show you the man help for men! To see all the man pages available in Ubuntu use man -k .

What does close () do in C?

The close() function shall deallocate the file descriptor indicated by fildes. To deallocate means to make the file descriptor available for return by subsequent calls to open() or other functions that allocate file descriptors.

How do I open a man page?

to open a man page. If you want to open the page for xterm, a terminal probably on your system, type man xterm . Man pages are sorted into sections.


2 Answers

If you use the "normal" libstdc++ shipped with g++, its documentation is available online here.

Most Linux distributions make it also available offline as a particular package; for Debian-derived distros, for example, it's libstdc++-6-<version>-doc (e.g. on my Ubuntu machine I have libstdc++-6-4.4-doc installed). In general the documentation will be put somewhere like /usr/share/doc/libstdc++-6-4.4-doc.

This about implementation-specific documentation; for compiler-agnostic docs, instead, many sites on the Internet provide reference documentation for the standard library.

One of the most referenced is nowadays cppreference.com, that is actively maintained, tends to be very faithful to the standard and shows well the differences between the various standard versions; it can be a bit intimidating to newbies, though.

cplusplus.com historically was one of the most used (especially as it is very "liked" by search engines), but was known to contain several errors or incorrect simplifications; I don't know if it got any better in these last years.

Also, the C++ library section on msdn.microsoft.com has got much better in the recent years in separating what are the Microsoft-specific details from what the standard dictates.

Finally, if you want precision up to the paranoia, the ultimate normative document is the C++ standard, that is sold from ISO, ANSI and BSI (for a quite high price); there are however several drafts available for free, which are more than good enough for "casual use".

like image 159
Matteo Italia Avatar answered Oct 11 '22 13:10

Matteo Italia


In Ubuntu, after installing libstdc++-6-x.x-doc, these docs are available via man, examples(libstdc++-4.8-doc)

man std::list
man std::weak_ptr
man std::ios_base

To get a list of these entries, use

apropos -r '^std' | vi -

This command gets all man entries beginning with std and sends them to vi.

==========

Update: as of libstdc++-4.8-doc, the prefix is std:: instead of std_.

like image 45
don't panic Avatar answered Oct 11 '22 12:10

don't panic