By default, Linux is man is not able to consult C + + standard library functions, this is inconvenient, there is no way to direct the man C + + standard library functions?
Of course there is, but to do their own hands, to be clothed!
1. Download and install Manpages
If the Linux under Man is not the standard C-language function, it is because there is no manpages, you can install it yourself!
yum install manpages
This approach does not solve the C + + standard library function query problem, we need to download the relevant man page ourselves
- C + + man pages:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/(no FQ to access, except for the Great Wall of the pit daddy)
- Github:https://github.com/jimmy-nie/vim.git (prevent the above URL from not going)
Note, be sure to download libstdc++ xxxxxx.man.tar.bz2
, because this is the real man pages, it is recommended to download the latest version, support C++11/14 and other standards
After the download is complete, unzip the command:
tar -jxvf libstdc++-man.4.4.0.tar.bz2
After the decompression is complete, the extracted content is copied to /usr/share/man/man3
, note, do not overwrite the original MAN3 folder!
2. Querying C + + library functions
To avoid confusion between the operating system and C + +, the currently installed C + + man pages are different from the direct query of the C language standard function, which requires a namespace restriction:
- Man namespace::function: standard library function query
- Man Namespace::header: Standard header file Query
- Man Namespace::class: Queries for classes in some standard libraries
If I want to query string.length usage, I need to query first and man std::string
then use the /length
search function
Linux man C + + library functions