Computers are electronic information-processing machines. Data and programs in these machines are saved, moved, and transformed in the form of electrical voltages. These electrical voltages can be interpreted as a zeros and ones. The zeros and ones can be aggregated and interpreted as words, numbers, images, sounds, and so on. Long ago, information-be it data or programs-could be entered into the
Figure 1.1: A PDP-8 computer with front panel switches for entering instructions and data. (Image courtesy of the Computer Museum at the University of Stuttgart.
better methods. Computer programming languages convert text into the requisite binary instructions. C++ is a compiled language. This means that before the program is run, it is first
translated into a form that the machine can use directly. The C++ files (and a typical project contains several) are called the source files. You create the source files by typing them using a program called a text editor. The translation of the source files into a program proceeds in two phases. First,
the individual source files are translated by a program called the compiler into socalled object files. Next, a second program, called a linker (or loader) combines the individual object files into an executable file, that is, a program you can execute (run). The precise manner in which is all this is done (source file creation/editing, com-
piling, linking, and execution) varies among different computing platforms. In Appendix A we discuss how this is done for some common computing platforms (Windows, Macintosh, UNIX). Ideally, you have already done some programming, say in C, and so you are famil-
iar with the general flow of this process. If not, your best option is to have someone show you how to perform these basic steps. In theory, your computer contains documentation that explains all this. However, such documentation is most useful to someone who already knows what to do, but needs reminders on specifics. With the help of Appendix A, a friendly neighbor knowledgeable in programming,
and documentation (if any) you will get past this first, often frustrating hurdle. Rest assured that the process is simple once you know what it is. The hard part is knowing just which menu to select or what command to type to set the process in motion. For example, on many computers you translate your C++ files into a working program with the single command: