# C/C++ Programming Reference?



## joe88ds (Jan 1, 2014)

Hello everyone! I just recently started getting involved with programming for the first time with UNIX. I've been programming for a little while on Windows and am very spoiled with the MSDN (http://msdn.microsoft.com/library). Is there something like this for FreeBSD and UNIX in general? I've been searching and have not found anything I could possibly use. Where do I begin? Thank you for your time.


----------



## sossego (Jan 1, 2014)

Approach this with an open mind. You are using a different system.


----------



## Durden (Jan 1, 2014)

I'd start here:
http://www.freebsd.org/doc/en_US.ISO885 ... -handbook/


----------



## joe88ds (Jan 1, 2014)

I read the handbook already. I'm looking for a reference, not a guide on how to program. Thank you both for your answers and time. I did however find something I can use, http://www.cs.cf.ac.uk/Dave/C/CE.html. If anyone else has something like this then I would be very interested in using it.


----------



## Durden (Jan 1, 2014)

You didn't mention what compiler you were using? If using LLVM/Clang I'd look into the documentation on their site, likewise if using GCC. I'd also look into the docs for libc and libc++ etc. You'll never find something quite as comprehensive as MSDN but all the info is out there. If you're doing graphical programming then you'll find documentation for that on the toolkits websites most likely, such as QT or GTK3 etc.


----------



## jrushford (Jan 1, 2014)

You might want to have a look at Richard W. Stevens books.  "Advanced Programming in the UNIX Environment, 3rd edition".  He also wrote two volumes on "UNIX Network Programming".  His books are excellent references and are now co-authored by Stephen Rago as Mr. Stephens passed away a few years ago.

John


----------



## drhowarddrfine (Jan 1, 2014)

The above mentioned Unix books by Stevens are the best.

http://www.java2s.com/Code/C/CatalogC.htm
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/
http://www.unix.org/version3/apis.html
http://www.gnu.org/software/libc/manual ... /libc.html


----------



## joe88ds (Jan 1, 2014)

Thank you everyone! This is very helpful. Those books look very promising and I will definitely consider buying one in the near future. I think for the time being the reference material that everyone so kindly helped me find will be enough for now. Thank you again for your time.


----------



## kpedersen (Jan 2, 2014)

UNIX also has manpages.
For example, if I wanted to see how popen() works I would do


```
$ man popen
```

This provides documentation on the parameters, return type etc...


----------



## zodias (Jan 10, 2014)

joe88ds said:
			
		

> Hello everyone! I just recently started getting involved with programming for the first time with UNIX. I've been programming for a little while on Windows and am very spoiled with the MSDN (http://msdn.microsoft.com/library). Is there something like this for FreeBSD and UNIX in general? I've been searching and have not found anything I could possibly use. Where do I begin? Thank you for your time.



I use this for C++ :
http://www.cplusplus.com/reference/


----------



## nslay (Jan 16, 2014)

joe88ds said:
			
		

> Hello everyone! I just recently started getting involved with programming for the first time with UNIX. I've been programming for a little while on Windows and am very spoiled with the MSDN (http://msdn.microsoft.com/library). Is there something like this for FreeBSD and UNIX in general? I've been searching and have not found anything I could possibly use. Where do I begin? Thank you for your time.



Use the manual pages (man(1)) sections 2 and 3.  For example:
`man 2 send`
`man 3 pthread`

Some stuff can be in other sections (e.g. a discussion about AF_UNIX sockets API would be unix(4), and tun(4) would be for the tunneling device API if you wanted to write a VPN client). If you're not sure, you can use the -k flag to search the manual pages. I personally like the manual pages better than MSDN. Also, if you're using the POSIX API, you can sometimes find documentation at http://www.opengroup.org/.


----------



## worldi (Jan 16, 2014)

There's also the ultimate form of documentation available. It's written mainly in C and usually located in /usr/src.


----------

