2014-11-09 118 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.
相關問題