How This Book Is Organized

I l @ ve RuBoard

You must crawl before you walk. In Part I, you learn how to crawl. These chapters teach you enough to write very simple programs. You start with the mechanics of programming and programming style. Next, you learn how to use variables and very simple decision and control statements.

At this point you will have learned enough to create very simple programs; therefore, in Chapter 7, you embark on a complete tour of the programming process that shows you how real programs are created.

  • Chapter 1 gives you an overview of C++, describes its history and uses, and explains how the language is organized.

  • Chapter 2 explains the basic programming process and gives you enough information to write a very simple program.

  • Chapter 3 discusses programming style. How to comment a program is covered, as well as how to write clear and simple code.

  • Chapter 4 introduces simple C++ statements. Basic variables and the assignment statement are covered in detail along with the arithmetic operators: + , - , * , / , and % .

  • Chapter 5 covers arrays and more complex variables. The shorthand operators ++ , -- , *= , = , += , -= , /= , and %= are described.

  • Chapter 6 explains simple decision statements including if , else , and for . The problem of == versus = is discussed.

  • Chapter 7 takes you through the steps required for creating a simple program, from specification through release. Fast prototyping and debugging are discussed.

Part II describes all the other simple statements and operators that are used in programming. You also learn how to organize these statements into simple functions.

  • Chapter 8 describes additional control statements. Included are while , break , and continue . The switch statement is discussed in detail.

  • Chapter 9 introduces local variables, namespaces, functions, and parameters.

  • Chapter 10 describes the C++ preprocessor, which gives you great flexibility in creating code. It also provides a tremendous number of ways for you to screw up. Simple rules that help keep the preprocessor from becoming a problem are described.

  • Chapter 11 discusses the logical C++ operators that work on bits.

In Part III you learn how basic declarations and statements can be used in the construction of advanced types such as structures, unions, and classes. You also learn about the concept of pointers.

  • Chapter 12 explains structures and other advanced types. The sizeof operator and the enum type are included.

  • Chapter 13 introduces the concept of a class . This is one of the more powerful features of C++. Classes allow you to group data and the operations that can be performed on that data into one object.

  • Chapter 14 describes additional operations that can be performed with classes.

  • Chapter 15 introduces C++ pointer variables and shows some of their uses.

Advanced programming techniques are explored in Part IV. In this section, you explore a number of C++ features that let you create complex, yet easy-to-use objects or classes.

  • Chapter 16 describes both buffered and unbuffered input/output (I/O). ASCII and binary files are discussed and you are shown how to construct a simple file. Old C-style I/O operations are also included.

  • Chapter 17 describes how to debug a program and how to use an interactive debugger. You are shown not only how to debug a program, but also how to write a program so that it is easy to debug. This chapter also describes many optimization techniques to make your programs run faster and more efficiently .

  • Chapter 18 explains that C++ allows you to extend the language by defining additional meanings for the language's operators. In this chapter, you create a complex type and the operators that work on it.

  • Chapter 19 uses a simple decimal floating-point format to introduce the problems inherent in using floating points, such as roundoff errors, precision loss, overflow, and underflow.

  • Chapter 20 describes advanced use of pointers to construct dynamic structures such as linked lists and trees.

  • Chapter 21 shows how to build complex, derived classes out of simple, base ones.

Several miscellaneous features are described in Part V.

  • Chapter 22 explains how to handle unexpected conditions within a program.

  • Chapter 23 shows how to split a program into several files and use modular programming techniques. The make utility is explained in more detail.

  • Chapter 24 allows you to define a generic function or class that generates a family of functions.

  • Chapter 25 describes the template library that comes with C++. This library consists of a number of "container templates" and related data structures which let you create very complex and robust data structures with very little work.

  • Chapter 26 discusses some of the methodologies used to design programs, such as structured programming and object-oriented design. Not only are the design methods discussed, but also the reasoning that went into the design of the program.

  • Chapter 27 details the steps necessary to take a complex program from conception to completion. Information hiding and modular programming techniques, as well as object-oriented programming, are stressed.

  • Chapter 28 describes how to turn C code into C++ code and addresses many of the traps lurking in C code that bite the C++ programmer.

  • Chapter 29 describes the little used do / while statement, the comma operator, and the ?: operators.

  • Chapter 30 lists programming adages that will help you construct good C++ programs.

Part VI contains additional C++ reference information.

  • Appendix A contains a list of character codes and their values.

  • Appendix B lists the numeric ranges of some C++ variable types.

  • Appendix C lists the rules that determine the order in which operators are evaluated.

  • Appendix D contains a program that shows how the computer can compute the value of the sine function.

  • Appendix E lists information on the programming resources mentioned in the book.

I l @ ve RuBoard


Practical C++ Programming
Practical C Programming, 3rd Edition
ISBN: 1565923065
EAN: 2147483647
Year: 2003
Pages: 364

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net