I have already installed gcc.
for man 2 cout
root@kota-laptop:/# man 2 cout
No manual entry for cout in section 2
root@kota-laptop:/# man 2 printf
No manual entry for printf in section 2
See 'man 7 undocumented' for help when manual pages are not available.
Installing gcc does not bring in the developer manpages.
sudo aptitude install manpages-dev manpages-posix-dev
That will install the docs for POSIX and C development.
Edit since Ubuntu's package listing website is weird
For C++ docs, you can install the libstdc++6-4.3-doc package or libstdc++6-4.4-doc, depending on your installed GCC (hooray for obscure naming).
- 4.3: http://packages.ubuntu.com/search?keywords=libstdc%2B%2B6-4.3-doc
- 4.4: http://packages.ubuntu.com/search?suite=default§ion=all&arch=any&searchon=names&keywords=libstdc%2B%2B6-4.4-doc
I don't use Ubuntu, so I can only assume it's: sudo aptitude install libstdc++6-4.4-doc
Edit the stuff below is crufty and left for reference
However, Ubuntu does not have any C++ manpages for simple installation. For that, you will have to install the manpages yourself from GNU libstdc++ documentation, available at their FTP site: ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/
You will want to download the ones suitable for your version of libstdc++.
If you intend to use ubuntu as a development work station, your first stop shop should be:
sudo apt-get install build-essential
As @birryree noted, you might not get all the things you need, but this first step will save you some hassle later.
精彩评论