# C and C++ man (help) for FreeBSD.



## valsorym (Oct 9, 2011)

Hi all,

If i use 

```
# man 3 printf
```

I have good help fo C language. It is cool (sorry, very well).
But this method do not have description many functions. Example:

```
# man 3 write
...
# man 3 read
...
# man 3 socket
```

and all.

Sometime I use 

```
# grep -R socket /usr/include
```
for search needed me function, and see it realisation. 

I read someone article (about development C in Linux), many people recomended use:

```
-> c-cpp-reference
-> manpages-dev
```

but I can not find this on FreeBSD.
How do you get help on C function in your FreeBSD?

_P.S. Looking through the examples, sometimes you need to know that for any function and the module it belongs._


----------



## drhowarddrfine (Oct 9, 2011)

You're looking in the wrong place. socket, read and write are in man 2 for example.


----------



## expl (Oct 9, 2011)

Section 3 is for library functions, like printf that is part of libc. Section 2 is for system calls like read, write. Choose your section wise.


----------



## valsorym (Oct 9, 2011)

Thanks!


----------



## fonz (Oct 15, 2011)

doorways said:
			
		

> How do you get help on C function in your FreeBSD?



man(1)
apropos(1)

The Fine Manuals can be searched for the keyword _foo_ by using either of the following:
`% man -k foo`
`% apropos foo`
`% whatis foo`
The first two commands are identical, the last one does slightly stricter matching.

Also, you don't always need to specify a section number, they only matter when there are man pages with the same name in more than one section (and the first one found isn't the one you're looking for), such as printf(1) and printf(3). Simply typing
`% man socket`
will suffice if you haven't otherwise modified the setup of man on your system.

Fonz

P.S. You don't need to be root to read manuals...

P.P.S. The man command is _orthogonal_, meaning that you can type `% man man` to bring up the manual of the manual and discover more about how man itself works


----------

