The introduction toOn To C++follows. Additionalinformation about this book, along with access to software, is availablevia http://www.ascent.com/books How On To C++ Teaches You C++ The purpose of this book is to help you learn the essentials ofC++ programming. In this section, you learn why you shouldknow C++ and how this book is organized. The C++ programming language is related toC. Because ++ is C's increment operator, and because thedevelopers of C++ viewed C++ as an incremental augmentation of C,rather than as a completely different language, they decided to use C and ++ in C++'s name. In the vernacular of programming, anobjectis a packet ofinformation stored in a chunk of computer memory.
Every objectis associated with a data type, and the data type determines whatcan be done to an object. All programming languages havebuilt-in data types, such as the integer data type and thecharacter data type. Anobject-oriented programming languageencourages you todesign programs around data types and data-type hierarchies that youdefine yourself. Typically, you define data types and data-typehierarchies so that you can describe individual nails,horseshoes, horses, kingdoms, or whatever else happens to come upnaturally in your application. In contrast,procedure-oriented programming languagesencourage youto think in terms of procedures, instead of in terms of data types anddata-type hierarchies. In this book, you learn more about whatobject-orientedmeans andwhy many programmers prefer object-oriented languages. For now, itsuffices to know that C++ is an object-oriented programming language,whereas most other programming languages areprocedure-orientedprogramming languages. C++ became a popular object-oriented programming language because its parentlanguage, C, was already popular.
C, in turn, became popular by virtueof attractive characteristics, such as the following: C is easy to learn. C programs are fast. C programs are concise. C compilers -- programs that translate C programs intomachine instructions -- are usually fast and concise. C compilers and C programs run on all sorts of computers,from small personal computers to huge supercomputers. Unix, a popular operating system, happens to be written in C. There are two principal reasons to learn C++: The productivity of C++ programmersgenerally exceeds the productivity of C programmers. Hence, C++programmers are in demand.
The supply of powerful off-the-shelf C++ software modules,both free and for sale, is increasing rapidly. The supply ofoff-the-shelf C modules, most of which you can incorporate intoC++ programs, is already huge. Also, because C++ is the most widely used object-oriented programminglanguage, you often hear programmers debate the merits of otherobject-oriented languages in terms of advantages and disadvantages relative toC++. Four principles determined this introductory book's organization and style: The book should get you up and running in the language quickly. The book should answer your basic questions explicitly. The book should encourage you to develop a personal library ofsolutions to standard programming problems. The book should deepen your understanding of the art of goodprogramming practice. To get you up and running in C++ quickly, the sections in thisbook generally supply you with the most useful approach to eachprogramming need, be it to display characters on your screen, todefine a new function, or to read inf.