Introduction to C++ Programming and Data Structures Fourth Edition by Y. Daniel Liang is an interactive ebook, called Revel for Liang C++, which is the fourth edition improved upon the third edition. The Revel book has the built-in interactives for CodeAnimation, LiveExample, and AlgorithmAnimation. These interactives are very helpful for new students to learn programming. Instructors can assign auto-graded small exercises and projects.
How to Access Revel?
The Revel version can be accessed from revel.pearson.com. Use your Pearson username to login. If you don't have a Pearson account, request it from your Pearson Representative.
Key New Features:
- Since C++11 compilers are widely available now, this edition incorporates the following C++11 features to develop better programs throughout the book.
- The long long int and unsigned long long types for declaring a signed and unsigned long integer of 64 bits are covered in Chapter 2.
- Chapter 7 introduces traversing array elements using a foreach loop. The foreach loop can also be used to traverse elements in a container such as vector, list, and set. Chapter 7 also introduces converting numbers to strings using the to_string function.
- Chapter 10 introduces member initializers for initializing data fields in an object.
- The string class's back() and front() functions are introduced in Chapter 10.
- You can use the nullptr keyword to represent a null pointer in Chapter 11, which is better than using NULL or 0.
- Chapter 12 introduces vector initializers to simplify coding for initializing vectors. The smart pointer class unique_ptr is also introduced in this chapter for performing automatic object destruction.
- Chapter 13 shows that you can pass a file name as a string or C-String, whichever is convenient.
- Chapter 15 introduces to use the override keyword to prevent errors for overriding functions, and the final keyword to prevent a virtual function from being further overridden.
- Chapter 22 introduces the auto keyword for type inference. This is useful to simplify coding for variables of complex data types that can be automatically discovered by the compiler in the context. The auto keyword should only be used for complex types, not simple types for improving the readability of the code. We introduce this new feature later in the book to avoid misusing or abusing it.
- Chapter 23 introduces lambda functions and new STL algorithms.
- Appendix H discusses regular expressions.
The following table shows the correlation of the changes to the previous edition.
Correlation to the Previous Edition
This Book (4E) | What's New | Previous Book (3E) |
---|---|---|
Global Changes |
The following new C++11 features are covered in this edition:
Additional new features:
|
|
Chapter 1 Introduction to Computers, Programs, and Java |
|
Chapter 1 |
Chapter 2 Elementary Programming |
|
Chapter 2 |
Chapter 3 Selections |
|
Chapter 3 |
Chapter 4 Mathematical Functions, Characters, and Strings |
|
Chapter 4 |
Chapter 5 Loops |
|
Chapter 5 |
Chapter 6 Functions |
|
Chapters 6 |
Chapter 7 Single-Dimensional Arrays and C-Strings |
|
Chapter 7 |
Chapter 8 Multidimensional Arrays |
|
Chapter 8 |
Chapter 9 Objects and Classes |
|
Chapter 9 |
Chapter 10 Object-Oriented Thinking |
|
Chapter 10 |
Chapter 11 Pointers and Dynamic Memory Management |
|
Chapter 11 |
Chapter 12 Templates, Vectors, Stacks, and Smart Pointers |
|
Chapter 12 |
Chapter 13 File Input and Output |
|
Chapter 13 |
Chapter 14 Operator Overloading |
|
Chapter 14 |
Chapter 15 Inheritance and Polymorphism |
|
Chapter 15 |
Chapter 16 Exception Handling |
|
Chapter 16 |
Chapter 17 Recursion |
|
Chapter 17 |
Chapter 18 Developing Efficient Programs |
|
Bonus Chapter 18 |
Chapter 19 Sorting |
|
Bonus Chapter 19 |
20 Linked Lists, Stacks, and Queues |
|
Bonus Chapter 20 |
Chapter 21 Binary Search Trees |
|
Bonus Chapter 21 |
Chapter 22 STL Containers |
|
Bonus Chapter 22 |
Chapter 23 STL Algorithms |
|
Bonus Chapter 23 |
Chapter 24 Hashing |
|
|
Chapter 25 AVL Trees |
|
Bonus Bonus Chapter 26 |
Chapter 26 Graph Applications |
|
Bonus Chapter 24 |
Chapter 27 Weighted Graph Applications |
|
Bonus Chapter 25 |