C++ tutorial: compilers


Computers don't speak C++
This is a very fundamental point. Computers work in numbers; high level languages like C, C++, Java, etc., are designed for the convenience of people, not computers. Beginning students often make the mistake of thinking that the computer is directly processing the C/C++ program, when it isn't. The C/C++ compiler is responsible for turning the program that you write into something the computer can understand. That 'something' is called an executable, i.e., something that can be executed by the computer. In the DOS/Windows world, exectables are usually files ending in '.exe' These files contain no information that would make sense to a human being; they are for the benefit of the computer. The files that you will create, that contain C++ programs, will be converted by the compiler to executables.

Modern 'compilers' do a lot more besides compile
A recent development in the programming field is the integrated develoment environment (IDE). An IDE is a single piece of software that will carry out all the work necessary to create an executable program, apart from writing it. The IDE allows the programmer to create the program, edit it, compile it and run it. It may also have debugging features, that help to track down errors in the program. When you get to building large, complex programs, the IDE will help to manage the various components and keep them up to date.

The individual steps of editing, compiling, linking (combining components of the program), running and debugging can be carried out separately using different pieces of software, and some people prefer to work this way. However, for beginners, an IDE is strongly recommended.

Different compilers are available
A number of companies make C++ compilers; good products are available from Borland, Microsoft and Watcomm, among others. On the whole it is a matter of personal preference which one you use. For the purposes of this course, it will not make any difference. The features we will be using are common to all C++ compilers.

When you come to write programs that take advantage of the features of a particular operating system, like Microsoft Windows, and use sophisticated uer interface features like windows, menus, list boxes, toolbars, etc., then the choice becomes more complicated. You should seek expert advice when you get to this stage!

©1994-2003 Kevin Boone, all rights reserved