2014-11-09 75 views
0

我想在终端上看到C++关键字的手动条目,如std::vector,std::set,std::map, iostream,std::size() e.t.c,但它说,没有手动输入这些命令。甚至当我输入man iostream时也显示相同的内容。 g++安装在我的电脑中。为什么没有在gcc-4.9.1-4ubuntu2中手动输入std :: vector?

+0

手册页不包括C++标准库,据我所知。 – 2014-11-09 01:10:55

+0

我已经看到了,它显示了STL以及其他C++命令的结果。在我的情况下,它甚至没有显示“man bool”“man namespace”。 – Shravan40 2014-11-09 01:14:17

+0

它确实为某些图书馆显示。像stdio和东西。但并非一切都被覆盖。 – saruftw 2014-11-09 01:16:50

回答

4

在基于Linux的计算机上没有人为C++语言及其功能提供支持。如果你真的想与标准文档在线工作,您可以参考cppreference

但是您也可以下载cppreference各种格式的完整文档和工作离线。我建议你应该遵循这一点,从下面的位置下载完整的文件存档:

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

1

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

要找到关于C++标准库的文档,我推荐使用cppreference.com,由Bjarne 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.
相关问题