Modern C++:Efficient and Scalable Application Development
上QQ阅读APP看书,第一时间看更新

What This Book Covers

Chapter 1Understanding Language Features, covers C++ statements and expressions, constants, variables, operators, and how to control execution flow in applications.

Chapter 2Working with Memory, Arrays, and Pointers, covers how memory is allocated and used in C++ applications, how to use built-in arrays, the role of C++ references, and how to use C++ pointers to access memory.

Chapter 3Using Functions, explains how to define functions, how to pass parameters-by-reference and by-value using a variable number of parameters, creating and using pointers to functions, and defining template functions and overloaded operators.

Chapter 4Classes, describes how to define new types through classes and the various special functions used in a class, how to instantiate a class as an object and how to destroy them, and how to access objects through pointers and how to write template classes.

Chapter 5, Using Standard Library Containers, covers all the C++ Standard Library container classes and how to use them with iterators and the standard algorithms so that you can manipulate the data in containers.

Chapter 6, Using Strings, describes the features of the standard C++ string class, converting between numeric data and strings, internationalizing strings, and using regular expressions to search and manipulate strings.

Chapter 7, Diagnostics and Debugging, explains how to prepare your code to provide diagnostics and to enable it to be debugged, how applications are terminated, abruptly or gracefully, and how to use C++ exceptions.

Chapter 8, Learning Modern Core Language Features, teaches you about modern core language features including type inference, uniform initialization, scoped enums, range-based for loops, structured bindings, and others.

Chapter 9, Working with Numbers and Strings, discusses how to convert between numbers and strings, generate pseudo-random numbers, work with regular expressions, and various types of string.

Chapter 10, Exploring Functions, dives into defaulted and deleted functions, variadic templates, lambda expressions, and higher-order functions.

Chapter 11Standard Library Containers, Algorithms, and Iterators, introduces you to several standard containers, many algorithms, and teaches you how to write your own random access iterator.

Chapter 12, Math Problems, contains a series of math exercises to warm you up for the more challenging problems in the next chapters.

Chapter 13, Language Features, proposes problems for you to practice operator overloading, move semantics, user-defined literals, and template metaprogramming aspects such as variadic functions, fold expressions, and type traits.

Chapter 14Strings and Regular Expressions, has several problems for string manipulation, such as converting between strings and other data types, splitting and joining strings, and also for working with regular expressions.

Chapter 15, Streams and Filesystems, covers output stream manipulation and working with files and directories using the C++17 filesystem library.

Chapter 16, Date and Time, prepares you for the upcoming C++20 extensions to the chrono library, with several calendar and time zone problems that you can solve with the date library, on which the new standard additions are based.

Chapter 17, Algorithms and Data Structures, is one of the largest chapters and contains a variety of problems where you need to utilize the existing standard algorithms; others are where you need to implement your own general-purpose algorithms or data structures, such as circular buffer and priority queue. The chapter ends with two rather fun problems, Dawkins' Weasel program and Conway's Game of Life program, where you can learn about evolutionary algorithms and cellular automata.