Book description
Create apps in C++ and leverage its latest features using modern programming techniques.
Key Features
 Develop strong C++ skills to build a variety of applications
 Explore features of C++17, such as containers, algorithms, and threads
 Grasp the standard support for threading and concurrency and use them in basic daily tasks
Book Description
C++ is one of the most widely used programming languages. It is fast, flexible, and used to solve many programming problems.
This Learning Path gives you an indepth and handson experience of working with C++, using the latest recipes and understanding most recent developments. You will explore C++ programming constructs by learning about language structures, functions, and classes, which will help you identify the execution flow through code. You will also understand the importance of the C++ standard library as well as memory allocation for writing better and faster programs.
Modern C++: Efficient and Scalable Application Development deals with the challenges faced with advanced C++ programming. You will work through advanced topics such as multithreading, networking, concurrency, lambda expressions, and many more recipes.
By the end of this Learning Path, you will have all the skills to become a master C++ programmer.
This Learning Path includes content from the following Packt products:
 Beginning C++ Programming by Richard Grimes
 Modern C++ Programming Cookbook by Marius Bancila
 The Modern C++ Challenge by Marius Bancila
What you will learn
 Become familiar with the structure of C++ projects
 Identify the main structures in the language: functions and classes
 Learn to debug your programs
 Leverage C++ features to obtain increased robustness and performance
 Explore functions and callable objects with a focus on modern features
 Serialize and deserialize JSON and XML data
 Create clientserver applications that communicate over TCP/IP
 Use design patterns to solve realworld problems
Who this book is for
This Learning Path is designed for developers who want to gain a solid foundation in C++. The desire to learn how to code in C++ is all you need to get started with this Learning Path
Publisher resources
Table of contents
 Title Page
 Copyright
 About Packt
 Contributors
 Preface
 Understanding Language Features
 Working with Memory, Arrays, and Pointers
 Using Functions
 Classes
 Using the Standard Library Containers
 Using Strings
 Diagnostics and Debugging

Learning Modern Core Language Features
 Using auto whenever possible
 Creating type aliases and alias templates
 Understanding uniform initialization
 Understanding the various forms of nonstatic member initialization
 Controlling and querying object alignment
 Using scoped enumerations
 Using override and final for virtual methods
 Using rangebased for loops to iterate on a range
 Enabling rangebased for loops for custom types
 Using explicit constructors and conversion operators to avoid implicit conversion
 Using unnamed namespaces instead of static globals
 Using inline namespaces for symbol versioning
 Using structured bindings to handle multireturn values

Working with Numbers and Strings
 Converting between numeric and string types
 Limits and other properties of numeric types
 Generating pseudorandom numbers
 Initializing all bits of internal state of a pseudorandom number generator
 Creating cooked userdefined literals
 Creating raw userdefined literals
 Using raw string literals to avoid escaping characters
 Creating a library of string helpers
 Verifying the format of a string using regular expressions
 Parsing the content of a string using regular expressions
 Replacing the content of a string using regular expressions
 Using string_view instead of constant string references

Exploring Functions
 Defaulted and deleted functions
 Using lambdas with standard algorithms
 Using generic lambdas
 Writing a recursive lambda
 Writing a function template with a variable number of arguments
 Using fold expressions to simplify variadic function templates
 Implementing higherorder functions map and fold
 Composing functions into a higherorder function
 Uniformly invoking anything callable

Standard Library Containers, Algorithms, and Iterators
 Using vector as a default container
 Using bitset for fixedsize sequences of bits
 Using vector<bool> for variablesize sequences of bits
 Finding elements in a range
 Sorting a range
 Initializing a range
 Using set operations on a range
 Using iterators to insert new elements in a container
 Writing your own random access iterator
 Container access with nonmember functions

Math Problems

Problems
 1. Sum of naturals divisible by 3 and 5
 2. Greatest common divisor
 3. Least common multiple
 4. Largest prime smaller than given number
 5. Sexy prime pairs
 6. Abundant numbers
 7. Amicable numbers
 8. Armstrong numbers
 9. Prime factors of a number
 10. Gray code
 11. Converting numerical values to Roman
 12. Largest Collatz sequence
 13. Computing the value of Pi
 14. Validating ISBNs

Solutions
 1. Sum of naturals divisible by 3 and 5
 2. Greatest common divisor
 3. Least common multiple
 4. Largest prime smaller than given number
 5. Sexy prime pairs
 6. Abundant numbers
 7. Amicable numbers
 8. Armstrong numbers
 9. Prime factors of a number
 10. Gray code
 11. Converting numerical values to Roman
 12. Largest Collatz sequence
 13. Computing the value of Pi
 14. Validating ISBNs

Problems
 Language Features

Strings and Regular Expressions

Problems
 23. Binary to string conversion
 24. String to binary conversion
 25. Capitalizing an article title
 26. Joining strings together separated by a delimiter
 27. Splitting a string into tokens with a list of possible delimiters
 28. Longest palindromic substring
 29. License plate validation
 30. Extracting URL parts
 31. Transforming dates in strings

Solutions
 23. Binary to string conversion
 24. String to binary conversion
 25. Capitalizing an article title
 26. Joining strings together separated by a delimiter
 27. Splitting a string into tokens with a list of possible delimiters
 28. Longest palindromic substring
 29. License plate validation
 30. Extracting URL parts
 31. Transforming dates in strings

Problems
 Streams and Filesystems
 Date and Time

Algorithms and Data Structures

Problems
 45. Priority queue
 46. Circular buffer
 47. Double buffer
 48. The most frequent element in a range
 49. Text histogram
 50. Filtering a list of phone numbers
 51. Transforming a list of phone numbers
 52. Generating all the permutations of a string
 53. Average rating of movies
 54. Pairwise algorithm
 55. Zip algorithm
 56. Select algorithm
 57. Sort algorithm
 58. The shortest path between nodes
 59. The Weasel program
 60. The Game of Life

Solutions
 45. Priority queue
 46. Circular buffer
 47. Double buffer
 48. The most frequent element in a range
 49. Text histogram
 50. Filtering a list of phone numbers
 51. Transforming a list of phone numbers
 52. Generating all the permutations of a string
 53. Average rating of movies
 54. Pairwise algorithm
 55. Zip algorithm
 56. Select algorithm
 57. Sort algorithm
 58. The shortest path between nodes
 59. The Weasel program
 60. The Game of Life

Problems
 Other Books You May Enjoy
Product information
 Title: Modern C++: Efficient and Scalable Application Development
 Author(s):
 Release date: December 2018
 Publisher(s): Packt Publishing
 ISBN: 9781789951738
You might also like
book
Advanced C++
Become an expert at C++ by learning all the key C++ concepts and working through interesting …
book
Mastering the C++17 STL
This book breaks down the C++ STL, teaching you how to extract its gems and apply …
book
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
book
Modern C++ Programming Cookbook  Second Edition
A pragmatic recipe book for acquiring a comprehensive understanding of the complexities and core fundamentals of …