设为首页 加入收藏

TOP

在C++ man pages中查询C++的函数
2014-11-24 07:20:48 来源: 作者: 【 】 浏览:0
Tags:man pages 查询 函数

在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 headeriostream. 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.


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇使用Java实现在HDFS中创建文件夹 下一篇Linux下摄像头图像数据的获取

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·用 C 语言或者限制使 (2025-12-25 08:50:05)
·C++构造shared_ptr为 (2025-12-25 08:50:01)
·既然引用计数在做 GC (2025-12-25 08:49:59)
·Java 编程和 c 语言 (2025-12-25 08:19:48)
·. net内存管理宝典这 (2025-12-25 08:19:46)