Ubuntu下C/C++man手册安装方法及使用方法
C++在线文档:
http://www.cplusplus.com/reference/
https://msdn.microsoft.com/zh-cn/library/aa187916.aspx [初学者如何使用MSDN]
http://tool.oschina.net/apidocs/apidoc?api=cpp%2Fen%2Fcpp.html
http://en.cppreference.com/w/cpp
下文转自:http://www.cnblogs.com/langqi250/archive/2012/11/01/2749980.html
1. 安装C的帮助手册
如果你使用的Linux发行版, 默认没有安装C语言的库函数MAN手册, 使用下面的方法解决:
# sudo apt-get install manpages
# sudo apt-get install manpages-de
# sudo apt-get install manpages-de-dev
# sudo apt-get install manpages-dev
2. 安装C++的帮助手册
一般的Linux发行版不会默认安装C++的帮助手册. 安装方法如下
http://gcc.gnu.org/mirrors.html是一个GCC的镜像站点
进入http://mirrors-us.seosue.com/gcc/站点, 或者其他的可用站点, 找到路径libstdc++/doxygen/, 下载文件libstdc++-api-4.5.2.man.tar.bz2, 或者其他更新的版本.
解压后, 将man/man3下的所有文件拷贝到/usr/share/man/man3/中, 即可.
在Linux下查询命令或函数的使用,通常是这样:
man printf
man 3 printf
man cat
但是为了避免造成操作系统、C语言与C++的混淆,目前安装的C++ man pages与上面的查询命令有一些不同,主要是加了命名空间的限定,也就是说用这样的命令 : man cout , 是查询不到的。
正确的方法应该是:
man std::iostream ,之后再通过搜索/cout,找到cout的说明
也就是说现在的查询命令应该是
man namespace::header
man 命名空间::头文件
下面是英文原文:
How many times did you try on the terminal the following command and got frustrated
|
$ man cout
No manual entry forcout
|
If you have decided that there is no way you can find more about cout apart from going to web, then read the article on how to install C++ man pages?
Once you have installed the documentation, you must follow the following method to know more about the function
If you are searching about cout, you know it is part of the namespace std and defined in the header iostream. So to search for cout, you must type
|
$ man std::iostream
|
Once the man page is open, you can search for cout.
Similarly for slist related function
|
$ man __gnu_cxx::slist
|
Thus the syntax to search any c++ man page is
|
$ man namespace::header
|
Note: The man pages are generated using doxygen. You may not much elaborate description like you get for C function.
Ubuntu下C/C++man手册安装方法及使用方法的更多相关文章
- ubuntu下Django的下载与安装(三种方法)
方法一: 1下载: 1 安装python,Linux系统下,一般是安装好的,可以输入如下命令查看 python -V 如果没有安装,则需要安装,安装方法如下,首先从官网下载源码,然后: (1) $ t ...
- Ubuntu下Sublime Text 3解决无法输入中文的方法
Ubuntu下Sublime Text 3解决无法输入中文的方法_百度经验http://jingyan.baidu.com/article/f3ad7d0ff8731609c3345b3b.html ...
- ubuntu下nodejs和npm的安装及升级
ubuntu 下 nodejs 和 npm 的安装及升级 参考:https://segmentfault.com/a/1190000007542620 一:ubuntu下安装 node 和 npm命令 ...
- Ubuntu下查看软件版本及安装位置【转】
Ubuntu下查看软件版本及安装位置 查看软件版本: aptitude show xxx 也可用apt-show-versions (要先安装sudo apt-get install apt- ...
- Linux下C/C++帮助手册安装方法
1. 安装C的帮助手册 如果你使用的Linux发行版, 默认没有安装C语言的库函数MAN手册, 使用下面的方法解决: # sudo apt-get install manpages # sudo a ...
- 关于ubuntu下sublime text 3 的安装和中文配置问题
一.sublime text 3 在ubuntu 16.04下的安装过程 1)首先下载sublime text 3 的tar包 $ wget https://download.sublimetext. ...
- ubuntu下chromium浏览器flash插件安装
ubuntu下chromium浏览器默认是不支持flash的,在新立德软件包中搜索flash得到的“Adobe Flash Player plugin installer”也没有什么卵用,因为装完以后 ...
- Ubuntu 下 vi 输入方向键会变成 ABCD 的解决方法
Ubuntu 下 vi 输入方向键会变成 ABCD,这是 Ubuntu 预装的是 vim tiny 版本,安装 vim full 版本即可解决. 先卸载vim-tiny: $ sudo apt-get ...
- Ubuntu下软件的搜索与安装
本文为笔者原创,首发于简书(点击这里查看). 小白玩转linux的第一个拦路虎就是软件的安装了.本文结合自己在Ubuntu14.04下软件安装经验做一个总结. 1.如何搜索软件? apt-cache ...
随机推荐
- tomcat安装配置.md
tomcat 安装 安装jdk jdk我使用的是oracle的,如果下载请在oracle的官网上下载.或者你也可以使用openjdk,官网在http://openjdk.java.net/. # ta ...
- IE11下不能引入外部css的解决方法
原: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o ...
- Lowest Common Ancestor of a Binary Tree
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According ...
- IE8下获取iframe document EVENT对象的问题
在一个页面中设置iframe的document Onclick 事件获取在iframe中的document被点击的对象,W3C如下: document.getElementById('iframe的I ...
- 跟我学习Storm_Storm基本架构
Storm集群类似于一个Hadoop集群. 然而你在Hadoop的运行“MapReduce job”,在Storm上你运行 “topologies”. “job”和“topologies”本身有很大的 ...
- 实时监控log文件
一个进程在运行,并在不断的写log,你需要实时监控log文件的更新(一般是debug时用),怎么办,不断的打开,关闭文件吗? 不用,至少有两个方法,来自两个很常用的命令: tail -f log.tx ...
- 单片机C语言探究--为什么变量最好要赋初值
有许多书上说,变量最好要赋初值.但是为什么要初值呢?不赋初值可能会出现什么样的意外呢?以下就我在以51单片机为MCU,Keil为编译器看到的实现现象作分析.众所周知,变量是存储在RAM中,掉电后即丢失 ...
- fdisk分区硬盘并shell脚本自动化
最近工作需要用到对硬盘进行shell脚本自动化分区和mount的操作,google了一些资料,下面做个总结. 如果硬盘没有进行分区(逻辑分区或者扩展分区,关于两者概念,自行google),我们将无法将 ...
- 创建多个Oracle数据库及相应的实例
转 http://blog.csdn.net/luiseradl/article/details/6972217 对于使用过SQL Server数据库的用户可以会对Oracle中的数据库的实例的概念理 ...
- 基于FPGA的音频信号的FIR滤波(Matlab+Modelsim验证)
1 设计内容 本设计是基于FPGA的音频信号FIR低通滤波,根据要求,采用Matlab对WAV音频文件进行读取和添加噪声信号.FFT分析.FIR滤波处理,并分析滤波的效果.通过Matlab的分析验证滤 ...