Page Tools:
  • print-friendly version

A Complete Guide to Programming in C++

Author(s): Peter Prinz
Ulla Prinz
Details:
  • ISBN-13: 9780763718176
  • ISBN-10:0763718173
  • Paperback    848 pages      © 2002
Price: International Sales $176.95 US List
Add to Cart Request a Review Copy

Overview

Winner of the Book of the Month for March 2002 by the British Computer Society.

A Complete Guide to Programming in C++ was written for both students interested in learning the C++ programming language from scratch, and for advanced C++ programmers wishing to enhance their knowledge of C++.

The chapters are organized to guide the reader from elementary language concepts to professional software development, with in-depth coverage of all the C++ language elements 'en route.' The order in which these elements are discussed reflects the goal of helping students create useful programs every step of the way.

Download student files

Each double-page spread in the book is organized to provide a description of the language elements on the right hand page while illustrating them by means of graphic and sample programs on the left.  The sample programs are chosen to illustrate a typical application for each language element.  In addition, case studies introduce the reader to a wide range of application scenarios.

At the end of chapter exercises and sample solutions allow students to test and enhance their performance and understanding of C++. Completing these tests, helps students to gain the marketable skills necessary to compete in tomorrow's competitive software development environment.

ShowKey Features

The book takes students step-by-step through the entire process of learning to program in C++.
The text provides a comprehensive, detailed and clear description of C++ based on the International Standard ISO/14882 that was ratified in 1998.
Another important didactic feature is that every double page is arranged to explain concepts and language elements on the right, illustrating with graphics and sample programs on the left.

Note boxes containing important rules or error hints are effective pedagogical components, and end of chapter exercises are sample solutions allow students to test and enhance their performance and understanding of C++.

Back to top

ShowTable of Contents

 

Chapter 1                Fundamentals     
                Development and Properties of C++                
                Object-Oriented Programming           
                Developing a C++ Program                
                A Beginner's C++ Program                 
                Structure of Simple C++ Programs                
                Exercises              
                Solutions              

Chapter 2                Fundamental Types, Constants, and Variables                
                Fundamental Types                
                Constants             
                Escape Sequences                
                Names                
                Variables              
                The Keywords const and volatile      
                Exercises             
                Solutions           

Chapter 3                Using Functions and Classes  
                Declaring Functions                
                Function Calls       
                Type void for Functions                
                Header Files        
                Standard Header Files                
                Using Standard Classes                
                Exercises              
                Solutions              

Chapter 4                Input and Output with Streams  
                Streams                
                Formatting and Manipulators                
                Formatted Output of Integers 
                Formatted Output of Floating-Point Numbers                
                Output in Fields 
                Output of Characters, Strings, and Boolean Values                
                Formatted Input   
                Formatted Input of Numbers                
                Unformatted Input/Output                
                Exercises              
                Solutions              

Chapter 5                Operators for Fundamental Types     
                Binary Arithmetic Operators                
                Unary Arithmetic Operators                
                Assignments        
                Relational Operators                
                Logical Operators                
                Exercises              
                Solutions              

Chapter 6                Control Flow       
                The while Statement                
                The for Statement                
                The do-while Statement                
                Selections with if-else     
                Else-if Chains                
                Conditional Expressions                
                Selecting with switch                
                Jumps with break, continue, and goto     
                Exercises              
                Solutions              

Chapter 7                Symbolic Constants and Macros  
                Macros                
                Macros with Parameters                
                Working with the #define Directive                
                Conditional Inclusion                
                Standard Macros for Character Manipulation                
                Redirecting Standard Input and Output                
                Exercises              
                Solutions              

Chapter 8                Converting Arithmetic Types     
                Implicit Type Conversions                
                Performing Usual Arithmetic Type Conversions                
                Implicit Type Conversions in Assignments                
                More Type Conversions               
                Exercises              
                Solutions              

Chapter 9                The Standard Class string                
                Defining and Assigning Strings   
                Concatenating Strings                
                Comparing Strings                
                Inserting and Erasing in Strings   
                Searching and Replacing in Strings                
                Accessing Characters in Strings   
                Exercises              
                Solutions              

Chapter 10                Functions              
                Significance of Functions in C++    
                Defining Functions                
                Return Value of Functions                
                Passing Arguments                
                Inline Functions                
                Default Arguments                
                Overloading Functions                
                Recursive Functions                
                Exercises              
                Solutions              

Chapter 11                Storage Classes and Namespaces                
                Storage Classes of Objects  
                The Storage Class extern                
                The Storage Class static                
                The Specifiers auto and register                
                The Storage Classes of Functions                
                Namespaces        
                The Keyword using                
                Exercises              
                Solutions              

Chapter 12                References and Pointers                
                Defining References                
                References as Parameters                
                References as Return Value      
                Expressions with Reference Type                
                Defining Pointers 
                The Indirection Operator                
                Pointers as Parameters                
                Exercises        
                Solutions              

 

Chapter 13                Defining Classes  
                The Class Concept              
                Defining Classes  
                Defining Methods                
                Defining Objects  
                Using Objects  
                Pointers to Objects                
                structs             
                Unions                
                Exercise                
                Solution                

Chapter 14                Methods              
                Constructors       
                Constructor Calls                
                Destructors          
                Inline Methods                
                Access Methods                
                const Objects and Methods                
                Standard Methods                
                this Pointer   
                Passing Objects as Arguments                
                Returning Objects                
                Exercises              
                Solutions              

Chapter 15                Member Objects and Static Members                
                Member Objects  
                Member Initializers                
                Constant Member Objects                
                Static Data Members                
                Accessing Static Data Members                
                Enumeration         
                Exercises              
                Solutions              

Chapter 16                Arrays                
                Defining Arrays    
                Initializing Arrays                
                Arrays                
                Class Arrays    
                Multidimensional Arrays                
                Member Arrays    
                Exercises              
                Solutions              

Chapter 17                Arrays and Pointers                
                Arrays and Pointers (1)                
                Arrays and Pointers (2)                
                Pointer Arithmetic                
                Arrays as Arguments                
                Pointer Versions of Functions                
                Read-Only Pointers                
                Returning Pointers                
                Arrays of Pointers                
                Command Line Arguments                
                Exercises              
                Solutions              

Chapter 18                Fundamentals of File Input and Output                
                Files                
                File Streams  
                Creating File Streams                
                Open Modes   
                Closing Files        
                Reading and Writing Blocks    
                Object Persistence                
                Exercises              
                Solutions              

Chapter 19                Overloading Operators                
                Generals                
                Operator Functions (1)                
                Operator Functions (2)                
                Using Overloaded Operators                
                Global Operator Functions                
                Friend Functions                
                Friend Classes  
                Overloading Subscript Operators                
                Overloading Shift-Operators for I/O                
                Exercises              
                Solutions              

Chapter 20                Type Conversion for Classes  
                Conversion Constructors                
                Conversion Functions                
                Ambiguities of Type Conversions                
                Exercise                
                Solution                

Chapter 21                Dynamic Memory Allocation                
                The Operator new                
                The Operator delete                
                Dynamic Storage Allocation for Classes  
                Dynamic Storage Allocation for Arrays    
                Application: Linked Lists                
                Representing a Linked List         
                Exercises              
                Solutions              

Chapter 22                Dynamic Members                
                Members of Varying Length   
                Classes with a Dynamic Member 
                Creating and Destroying Objects  
                Implementing Methods                
                Copy Constructor                
                Assignment          
                Exercises              
                Solutions              

Chapter 23                Inheritance            
                Concept of Inheritance                
                Derived Classes  
                Members of Derived Classes  
                Member Access   
                Redefining Members                
                Constructing and Destroying Derived Classes                
                Objects of Derived Classes  
                Protected Members                
                Exercises              
                Solutions              

Chapter 24                Type Conversion in Class Hierarchies                
                Converting to Base Classes  
                Type Conversions and Assignments                
                Converting References and Pointers                
                Explicit Type Conversions                
                Exercises              
                Solutions              

Chapter 25                Polymorphism     
                Concept of Polymorphism                
                Virtual Methods                
                Destroying Dynamically Allocated Objects                
                Virtual Method Table                
                Dynamic Casts      
                Exercises              
                Solutions              

Chapter 26                Abstract Classes  
                Pure Virtual Methods                
                Abstract and Concrete Classes  
                Pointers and References to Abstract Classes                
                Virtual Assignment                
                Application: Inhomogeneous Lists       
                Implementing and Inhomogeneous Lists       
                Exercises              
                Solutions              

Chapter 27                Multiple Inheritance                
                Multiply-Derived Classes                
                Multiple Indirect Base Classes  
                Virtual Base Classes                
                Constructor Calls                
                Initializing Virtual Base Classes  
                Exercises              
                Solutions              

Chapter 28                Exception Handling                
                Traditional Error Handling                
                Exception Handling                
                Exception Handlers                
                Throwing and Catching Exceptions                
                Nesting Exception Handling                
                Defining Your Own Error Classes  
                Standard Exception Classes                
                Exercises              
                Solutions              

Chapter 29                More About Files                
                Opening a File for Random Access   
                Positioning for Random Access   
                File State       
                Exception Handling for Files        
                Persistence of Polymorphic Objects  
                Application: Index Files                
                Implementing an Index File          
                Exercises              
                Solutions              

Chapter 30                More About Pointers                
                Pointer to Pointers                
                Variable Number of Arguments                
                Pointers to Functions                
                Complex Declarations                
                Defining Typenames                
                Application: Dynamic Matrices                
                Exercises              
                Solutions              

Chapter 31                Manipulating Bits                
                Bitwise Operators                
                Bitwise Shift Operators                
                Bit Masks    
                Using Bit Masks                
                Bit-Fields     
                Exercises              
                Solutions              

Chapter 32                Templates            
                Function and Class Templates                
                Defining Templates                
                Template Instantiation                
                Template Parameters                
                Template Arguments                
                Specialization       
                Default Arguments of Templates                
                Explicit Instantiation                
                Exercises              
                Solutions              

Chapter 33                Containers             
                Container Types  
                Sequences            
                Iterators                
                Declaring Sequences                
                Inserting in Sequences                
                Accessing Objects                
                Length and Capacity                
                Deleting in Sequences                
                List Operations                
                Associative Containers                
                Sets and Multisets                
                Maps and Multimaps                
                Bitsets                
                Exercise                
                Solution                

Appendix                
Index


Back to top

ShowAbout the Author(s)

Peter Prinz

Ulla Prinz

Back to top

ShowReviews

  • "What I like about it in particular is the format: the split-page (left side examples, right side test) design is a great idea for such a book --- the students need many, many examples. The coverage of topics is excellent (it lives up to the name "complete") and I personally like the order in which things are introduced: a very early introduction to the use of functions and object methods; references and pointers before arrays; ect."

    David A. Andrews
    University of Dallas
    Dept. of Mathematics

    "Finally I understand C++ Just as all the other reviewers before me I am very enthusiastic about this book!  At last a C++ book that is really comprehensive throughout, not only in the first chapters.  The best C++ book I ever read to this day."

    Copyright © 2001, Amazon.com, Inc.

    "Any one who wants to learn C++ must buy this book! While surfing the Internet I found this book and I can say only one thing: This book and 'Go to Java 2' are the best books I ever read. The examples are short and good. The chapters are written in a very clarifying and excellent manner. And the exercises are challenging. What more do you want? All other programming books should be like this one!"

    Copyright © 2001, Amazon.com, Inc.

    "Super, this book couldn't be better!  After reading your introduction and two reviews at Amazon.de, I decided to buy this book. I've owned it now for a week, and I have already read 200 pages. I must say: it couldn't be better. I never thought that a difficult programming language like C++ could be explained so simply. Really, a very big congratulation to the authors. Super!!!"

    Copyright © 2001, Amazon.com, Inc

    "Very well done!  First of all, congratulations to the authors for writing a very good (comprehensive) book, that provides deep insight to C++ programming. It is very well structured and I guess the authors did not forget anything, as the book covers very many different themes. In my opinion, one major advantage in comparison to other C++ books is that everything is described. For example how a stack is defined and implemented. The appendix describes the internal format of integers and double values in addition to how certain characters can be represented in a ANSI-standardized form."

    Copyright © 2001, Amazon.com, Inc

    "Simply genius! I have read many programming books written by different authors but this book exceeded my expectations. Just as in 'C for PC's' (also written by Kirch-Prinz, Prinz) the constructional concept of the book is very clarifying. A genius overview is supplied by partitioning every double page. On the left side graphics and program listings are placed, whereas on the opposite page there are detailed language descriptions. Concerning the sequencing of themes, the book is also very well structured. Starting with fundamentals the reader is led up to object-oriented programming including classes, inheritance, polymorphism, templates etc. The reader never gets the impression, that a theme would be too difficult for him. No one who reads the book from beginning to end will be bothered with double or triple explanations. You can use this book as dictionary as well. The table of contents is filled with well chosen terms. Beyond this an extensive index exists. I recommend this book for every reader. Beginners, advanced programmers and professional developers will be satisfied! A big compliment to the authors!"

    Copyright © 2001, Amazon.com, Inc

    "Outstanding textbook: C++ crystal clear in the OO sense
    The book introduces C++ to the novice in the OO sense from the start and really does cover all C++ language features (e.g. namespaces, templates, exceptions, STL). Even crucial points, such as polymorphism, dynamic members, up and down casts or pointers and bit manipulations are explained in a very expository and comprehensive manner. In particular, I appreciate the well structured organization of the chapters. Each double page contains graphics and many useful sample programs on the left-hand side, with language descriptions (without boring repetitions) on the right-hand side. End-of-chapter exercises and solutions round out this outstanding textbook."

    Dan Cohen
    Copyright © 2001, Barnes and Noble.com 

Back to top

ShowAppropriate Courses

This text is most appropriate for the introductory, or first, programming course where C++ is the vehicle used for teaching computer science programming concepts. This text is highly applicable as a self-teaching guide.  This book is an excellent reference language book that can be used for the first two courses in programming or as a course in teaching C++ to students with prior programming experience. 

  • CS1/C101    
  •  Introduction to Programming in C++    
  •  Programming in C++
Back to top

ShowResources

Back to top