Mastering C++ Programming

Preface

The main aim of this book is to help you to learn the fundamental constructs of the C++ language. It is organised as follows:

Author:
W.Arthur Chapman

Downloads:
Complete code

Chapters 1 and 2.
Provides an introduction to the fundamental structure, semantics and syntax of C++ and illustrates some of the basic enhance-ments made to C.

Chapter 3.
This deals with pointers and their uses, including a look at dynamic memory management. Whilst pointers are not as necessary in C++ as they are in C they still have important uses and anyone programming in C++ needs to have some understanding of their use.

Chapter 4.
Provides a glimpse of the essentials of input and output in C++ as well as a short review of i/o in C.

Chapter 5.
Provides more detail of classes, why they are needed, how they are constructed and how they are used.
Chapter 6.
A detailed discussion of the many extended function facilities, where the central concepts of function overloading and operator overload-ing is discussed.

Chapter 7.
Looks at ways of manipulating objects using arrays and point-ers.

Chapter 8.
Discusses inheritance, central to object oriented programming, and reusability.

Chapter 9.
Looks at the way classes can be used as containers for other classes and the extension to templates.

This book introduces the reader to the fundamental constructs of C++ and provides a gentle introduction to the ideas of object-oriented programming. It is an advantage to have some previous knowledge and experience of other programming language, such as Pascal or C. Languages such as Pascal, C and C++ are constructed out of a number of basic control structures (sequence, se-lection and iteration) and use well-defined blocks of code which perform par-ticular tasks (procedures and functions in Pascal; functions in C and C++). In addition these languages require some basic data types and allow the creation of user-defined data types. For example, in Pascal the fundamental types are integer, real, char, Boolean and, in some implementations, string. In C and C++ we have int, float and char. Type qualifiers (short, long, signed and unsigned) in C and C++ provide extensions to the basic data types. Further extensions are introduced through the use of arrays to provide collections of a particular data type (in all three languages) and then through the use of record in Pascal, struct (and typedef) in C and C++ and through the use of class in C++ to allow for more complex user-defined data types. The C++ language grew out of C (hence its name) and so is based on a functional approach to programming. In such languages a problem is broken down into modules, which perform a particular well-defined task. Each module is then created through a design process consisting of stages such as description, outline design, detail design, coding and testing. C++ can be thought of as an extension to C by, for example, introducing function and operator overloading or providing better ways of implementing abstract data types. However, it can also be thought of as a completely new language which allows for the use of a new approach to software design.


Contents

Introduction
A Quick Review of C
Some C++ Enhancements
Functions Again
C++ Classes
Getting into Classes
Towards Inheritance
Stream Input and Output
Object Oriented Design
Appendix 1 - Solutions to Selected Exercises
Appendix 2 - Glossary: Object Oriented Terminology
Index

Send comments

Please complete the following details:

Your name (Surname, First name):

E-mail:


Please add you comments:

 

Contacts

S.Tipple, Editor, Palgrave. E-mail: s.tipple@palgrave.com

RECOMMENDED READING AT AN AFFORDABLE PRICE!


Paperback - 352 pages (August 1998)
Palgrave, formerly Macmillan Press; ISBN: 0333731794