为什么在gcc-4.9.1-4ubuntu2中没有手动输入std :: vector?

时间:2014-11-09 01:09:35

标签: c++ c++11 gcc g++ ubuntu-14.10

我试图在终端中查看c ++关键字的手动输入,例如std::vector,std::set,std::map, iostream,std::size() e.t.c,但它说,这些命令没有手动输入。当我输入man iostream时,甚至显示相同的内容。 g++已安装在我的计算机中。

2 个答案:

答案 0 :(得分:4)

在基于Linux的机器上没有人支持C ++语言及其功能。如果您真的想使用标准文档在线,可以参考cppreference

但是,您也可以下载cppreference各种格式的完整文档,然后使用离线。我建议您按照此说明从以下位置下载完整的文档存档:

http://en.cppreference.com/w/Cppreference:Archives

答案 1 :(得分:1)

要在手册页中搜索内容,请使用-k--apropos,即man -k "vector"

要查找有关C ++标准库的文档,我建议使用cppreference.comBjarne Stroustrup编写的任何书籍以及C++ standard的最新工作草稿。


man-pages范围不包含C ++标准库。特别是,man man-pagesonline version)说:

DESCRIPTION
        This  page describes the conventions that should be employed when writ‐
        ing man pages for the Linux  man-pages  project,  which  documents  the
        user-space API provided by the Linux kernel and the GNU C library. [..]

接着描述手册页的各个部分。您还可以在man man中看到这些相同的部分。例如,它可能看起来像:

   Sections of the manual pages
       The manual Sections are traditionally defined as follows:

       1 Commands (Programs)
                 Those commands that can be executed by the user from within
                 a shell.

       2 System calls
                 Those functions which must be performed by the kernel.

       3 Library calls
                 Most of the libc functions.

       4 Special files (devices)
                 Files found in /dev.

       5 File formats and conventions
                 The format for /etc/passwd and other human-readable files.

       6 Games

       7 Overview, conventions, and miscellaneous
                 Overviews of various topics, conventions and protocols,
                 character set standards, and miscellaneous other things.

       8 System management commands
                 Commands like mount(8), many of which only root can
                 execute.