This is a list of a few C and C++ language tutorials available to a user. This list will include interactive tutorials, public-domain code collections, books etc. I’ve developed this FAQ purely as a volunteer effort as a service to the Internet community. Although every effort has been made to insure that all the information here is as accurate as possible, no guarantee is implied or intended.
I welcome comments, suggestions or criticism for all the people out there on the net that read this. If you can help me make this list a little better, you will be helping a lot of people out there on the net. I am a horrible writer and an even worse speller. If you find any errors or would like to suggest any additions please feel free to email me @ email@example.com Some of the items discussed here are platform-dependent, but most of the items are applicable across all platforms (portable). If you have any comments, suggestions, complaints, additions, etc, please feel free to email me @ firstname.lastname@example.org
If you are working on a tutorial or would like something added to this list, please e-mail me at the address given above. I must note that I haven’t been looking for or adding new resources since about 1996. I discovered Java and have since been putting all my energies into learning and teaching Java. But I’ve tried to make sure that all the links are current and so if you notice something wrong, just let me know.
The Origins of C and C++
The ‘C’ programming language was originally developed for and implemented on the UNIX operating system, on a DEC PDP-11 by Dennis Ritchie. One of the best features of C is that it is not tied to any particular hardware or system. This makes it easy for a user to write programs that will run without any changes on practically all machines. C is often called a middle-level computer language as it combines the elements of high-level languages with the functionalism of assembly language.
C allows the manipulation of bits, bytes and addresses- the basic elements with which the computer functions. Another good point about C is its portability which makes it possible to adapt software written for one type of computer to another. C was created, influenced, and field tested by working programmers. The end result is that C gives the programmer what the programmer wants. C offers the speed of assembly language and the extensibility of FORTH, but few of the restrictions of Pascal and Modula-2.
C++ is an enhanced version of the C language. C++ includes everything that is part of C and adds support for object-oriented programming (OOP). In addition, C++ also contains many improvements and features that make it a “better C”, independent of object oriented programming. C++ is actually an extensible language since we can define new types in such a way that they act just like the predefined types which are part of the standard language.
If you just use C++ as a better C, you will not be using all of its power. Like any quality tool, C++ must be used the way it was designed to be used to exploit its richness. Some of the new features include encapsulation, inline function calls, overloading operators, inheritance and polymorphism. I am not going to explain what they mean here as that would simply take me away from my purpose here, but you can refer to any good C++ book or the C++ FAQ for more information.
What do you need to get started?
The first thing you need is a compiler. A compiler reads the entire program and converts it into object code, which is a translation of the program source code into a form that the computer can execute directly.
Type cc at the % prompt. If you don’t get any error messages, you probably have a C compiler . If you get an error message, try acc, gcc or g++. If any of these don’t work, contact your local system administrator and ask him/her to get you a C/C++ compiler. GNU C/C++ compiler is available from a lot of anonymous ftp sites free of charge. Look into it. (I’ve got g++ running on my Linux box without any problems)
There are a lot of good compilers available to you. Check out www.simtel.net or for a ton of free and shareware compilers for the Windows platform. I can’t recommend any of them as most of my C or C++ programming is now on my Linux PC with with Code Fusion. If you want a great 32 bit operating system, you should look into Linux. I’ve been a Linux user since early 93 when the kernel was 0.99 or 0.97 and Slackware and SLS were the only distributions. Anyone remember those days??
If you’re serious about Linux, start by getting a copy of Running Linux by Matt Welsh. This is really a great book and will give you a great start. You can also start by getting a copy of RedHat, Caldera, Slackware or Debian Linux and starting off that way. You can also start by getting a new PC from DELL with Linux pre-installed. I don’t own any stock in DELL, I just love their PC’s. In fact, I don’t own any stocks of RedHat either as I was screwed by E-trade like all of the other people that got their special invitation from RedHat.
OpenVMS (VAX & AXP)
If you’re on a VAX, type in CC to check and see if you have a C compiler. VAX C is not the best compiler around, but it certainly does the job. If you don’t have a C compiler, look into the GNU C/C++ compiler GCC. You can get the VAX version of GCC from ftp.spc.edu via anonymous ftp. If on a AXP system, you should have access to DEC C/C++. Please contact your local system administrator or computer consultant for more site specific questions.
There are three main players in the Mac compiler market: MPW (from Apple), THINK C / Symantec C++ (both from Symantec), or CodeWarrior (from Metroworks): THINK C is $225 (only a C compiler), while Symantec C++ is $375 (includes C and C++ compilers). CodeWarrior comes in three versions: bronze, silver, and gold, at $199/299/399, respectively. Bronze generates 68K code, silver generates PowerPC code, and gold generates both. All three versions include C, C++, and Pascal compilers. The Symantec C++ compiler (ver 7.0) can be bought with a cross-compiler for the PowerMac.
There have been two attempts at freeware/shareware Mac C compilers: Sesame C and Harvest. Harvest C was an ambitious attempt at a production-quality freeware compiler which was later abandoned by the author.