C Resources
Libraries and Documentation
The C language itself does not have many commands; instead it readily lets you make use of code written by other people. The C Standard Library (libc) is a collection of useful code that lets you do crucial things such as get input, write to files, send data over the network, and issue commands to the system. This is automatically accessible to any C program (except some very special cases). Information about how to make use of the functions in libc is provided in online manuals, or "man pages". They will often be the first stop in for a programming query.
Many other libraries exist to help you with particular things. They have their own documentation and you may need to separately download them. If you wish to use them you need to include their header files and specify them when compiling.
Don't forget about Google! Typing "man function" into Google will usually get you some man pages about the function you specify.
- Online Linux man pages, contains man pages for libc, other libraries, Linux commands and more.
- ncurses, a library allowing extensive manipulation of a text-mode screen.
- SDL Library, a great cross-platform library for using graphics, sound, etc.
- OpenAL, a cross-platform 3D sound library.
- Generic Data Structures Library, a C library letting you use data structures including lists, queues, hash tables and binary trees.
Examples and Tutorials
C was not designed with ease of use in mind. Tutorials and example programs can be a big help in getting to know the language. High-quality tutorials are hard to find, and if you know of any, please let me know about them!
- ComputerGhost's C page.
C/C++ Compilers and tools
While you can write C programs with a text editor and invoke the compiler from the command line, an IDE makes everything easier. While many IDEs include compilers, you can usually supply an alternate compiler if you wish.
Cross-platform
For GNU/Linux, Mac OS X, UNIX
- Code::Blocks, an extensible C/C++ IDE.
For Windows
- MinGW (Minimalist GNU for Windows), a Windows port of gcc and other GNU compilation tools, with Windows-compatible standard header files and libraries.
- Open Watcom, a C/C++/Fortran compiler with a long history of excellence; its predecessors were used to build famous titles such as DOOM. It can easily create programs for several different operating systems!
- Dev-C++, a good (but not great) C/C++ IDE for Windows, making use of the mingw compiler. Includes a debugger and profiler.
- Code::Blocks, works on Windows too!
- Digital Mars, compilers.
For DOS
- Borland Turbo C, an old DOS compiler.
- djgpp, like MinGW but for DOS. Requires a 32-bit processor.
- Digital Mars.
Miscellaneous
- Open Watcom also works on OS/2.
- BDS C, a compiler for the 8080/Z80.
C++ Resources
Libraries and Documentation
The C++ standard library has much more stuff than libc. A lot of things have been recast into new forms (for instance, input and output are based on easy-once-you-know-how "string streams"). Part of it, known as the Standard Template Library (STL), defines all sorts of useful data structures and algorithms that can sometimes cut your code down dramatically. Unfortunately, it can be quite tricky to get the syntax right, and the error messages are hard to interpret. So getting proficient with it is a large investment, but it will pay off.
- CPP reference, a good reference for the STL, and other C++ info.
- The C++ FAQ Lite - a great online language reference for C++.
Examples and Tutorials
- Thinking in C++, volume I.