Book description
C++ is a powerful, highly flexible, and adaptable programming language that allows software engineers to organize and process information quickly and effectively. But this high-level language is relatively difficult to master, even if you already know the C programming language.The 2nd edition of Practical C++ Programming is a complete introduction to the C++ language for programmers who are learning C++. Reflecting the latest changes to the C++ standard, this 2nd edition takes a useful down-to-earth approach, placing a strong emphasis on how to design clean, elegant code.In short, to-the-point chapters, all aspects of programming are covered including style, software engineering, programming design, object-oriented design, and debugging. It also covers common mistakes and how to find (and avoid) them. End of chapter exercises help you ensure you've mastered the material.Practical C++ Programming thoroughly covers:
- C++ Syntax
- Coding standards and style
- Creation and use of object classes
- Templates
- Debugging and optimization
- Use of the C++ preprocessor
- File input/output
Publisher resources
Table of contents
- Practical C++ Programming
- A Note Regarding Supplemental Files
- Preface
-
I. The Basics
- 1. What Is C++?
-
2. The Basics of Program Writing
- 2.1. Programs from Conception to Execution
- 2.2. Creating a Real Program
- 2.3. Getting Help in Unix
- 2.4. Getting Help in an IDE
- 2.5. Programming Exercises
- 3. Style
-
4. Basic Declarations and Expressions
- 4.1. Basic Program Structure
- 4.2. Simple Expressions
- 4.3. The std::cout Output Object
- 4.4. Variables and Storage
- 4.5. Variable Declarations
- 4.6. Integers
- 4.7. Assignment Statements
- 4.8. Floating-Point Numbers
- 4.9. Floating-Point Divide Versus Integer Divide
- 4.10. Characters
- 4.11. Wide Characters
- 4.12. Boolean Type
- 4.13. Programming Exercises
- 4.14. Answers to Chapter Questions
-
5. Arrays, Qualifiers, and Reading Numbers
- 5.1. Arrays
- 5.2. Strings
- 5.3. Reading Data
- 5.4. Initializing Variables
- 5.5. Multidimensional Arrays
- 5.6. C-Style Strings
- 5.7. Types of Integers
- 5.8. Types of Floats
- 5.9. Constant and Reference Declarations
- 5.10. Qualifiers
- 5.11. Hexadecimal and Octal Constants
- 5.12. Operators for Performing Shortcuts
- 5.13. Side Effects
- 5.14. Programming Exercises
- 5.15. Answers to Chapter Questions
- 6. Decision and Control Statements
-
7. The Programming Process
- 7.1. Setting Up Your Work Area
- 7.2. The Specification
- 7.3. Code Design
- 7.4. The Prototype
- 7.5. The Makefile
- 7.6. Testing
- 7.7. Debugging
- 7.8. Maintenance
- 7.9. Revisions
- 7.10. Electronic Archaeology
- 7.11. Mark Up the Program
- 7.12. Use the Debugger
- 7.13. Use the Text Editor as a Browser
- 7.14. Add Comments
- 7.15. Programming Exercises
-
II. Simple Programming
- 8. More Control Statements
- 9. Variable Scope and Functions
- 10. The C++ Preprocessor
-
11. Bit Operations
- 11.1. Bit Operators
- 11.2. The AND Operator (&)
- 11.3. Bitwise OR (|)
- 11.4. The Bitwise Exclusive OR (^)
- 11.5. The Ones Complement Operator (NOT) (~)
- 11.6. The Left and Right Shift Operators (<<, >>)
- 11.7. Setting, Clearing, and Testing Bits
- 11.8. Bitmapped Graphics
- 11.9. Programming Exercises
- 11.10. Answers to Chapter Questions
-
III. Advanced Types and Classes
- 12. Advanced Types
- 13. Simple Classes
- 14. More on Classes
- 15. Simple Pointers
-
IV. Advanced Programming Concepts
-
16. File Input/Output
- 16.1. C++ File I/O
- 16.2. Conversion Routines
- 16.3. Binary and ASCII Files
- 16.4. The End-of-Line Puzzle
- 16.5. Binary I/O
- 16.6. Buffering Problems
- 16.7. Unbuffered I/O
- 16.8. Designing File Formats
- 16.9. C-Style I/O Routines
- 16.10. C-Style Conversion Routines
- 16.11. C-Style Binary I/O
- 16.12. C- Versus C++- Style I/O
- 16.13. Programming Exercises
- 16.14. Answers to Chapter Questions
-
17. Debugging and Optimization
- 17.1. Code Reviews
- 17.2. Serial Debugging
- 17.3. Going Through the Output
- 17.4. Interactive Debuggers
- 17.5. Debugging a Binary Search
- 17.6. Interactive Debugging Tips and Tricks
- 17.7. Runtime Errors
- 17.8. Optimization
- 17.9. How to Optimize
- 17.10. Case Study: Inline Functions Versus Normal Functions
- 17.11. Case Study: Optimizing a Color-Rendering Algorithm
- 17.12. Programming Exercises
- 17.13. Answers to Chapter Questions
- 18. Operator Overloading
- 19. Floating Point
-
20. Advanced Pointers
- 20.1. Pointers, Structures, and Classes
- 20.2. delete Operator
- 20.3. Linked Lists
- 20.4. Ordered Linked Lists
- 20.5. Doubly Linked Lists
- 20.6. Trees
- 20.7. Printing a Tree
- 20.8. The Rest of the Program
- 20.9. Data Structures for a Chess Program
- 20.10. Programming Exercises
- 20.11. Answers to Chapter Questions
- 21. Advanced Classes
-
16. File Input/Output
-
V. Other Language Features
- 22. Exceptions
-
23. Modular Programming
- 23.1. Modules
- 23.2. Public and Private
- 23.3. The extern Storage Class
- 23.4. Headers
- 23.5. The Body of the Module
- 23.6. A Program to Use Infinite Arrays
- 23.7. The Makefile for Multiple Files
- 23.8. Using the Infinite Array
- 23.9. Dividing a Task into Modules
- 23.10. Module Design Guidelines
- 23.11. Programming Exercises
- 24. Templates
- 25. Standard Template Library
- 26. Program Design
- 27. Putting It All Together
- 28. From C to C++
- 29. C++’s Dustier Corners
- 30. Programming Adages
- VI. Appendixes
- Index
- About the Author
- Colophon
- Copyright
Product information
- Title: Practical C++ Programming, 2nd Edition
- Author(s):
- Release date: December 2002
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449367169
You might also like
book
Practical C Programming, 3rd Edition
There are lots of introductory C books, but this is the first one that has the …
book
Modern C++ Programming Cookbook - Second Edition
A pragmatic recipe book for acquiring a comprehensive understanding of the complexities and core fundamentals of …
book
Practical C Programming
A comprehensive guide with practical instructions for learning data structures, low-level programming, high-performance computing, networking and …
book
Mastering C++ Programming
Take your C++ coding to the next level by leveraging the latest features and advanced techniques …