Book description
Test your C++ programming skills by solving real-world programming problems covered in the book
Key Features
- [*] Solve a variety of real-world programming and logic problems by leveraging the power of C++17
- [*] Test your skills in using language features, algorithms, data structures, design patterns, and more
- [*] Explore areas such as cryptography, communication, and image handling in C++
Book Description
C++ is one of the most widely-used programming languages and has applications in a variety of fields, such as gaming, GUI programming, and operating systems, to name a few. Through the years, C++ has evolved into (and remains) one of the top choices for software developers worldwide. This book will show you some notable C++ features and how to implement them to meet your application needs. Each problem is unique and doesn't just test your knowledge of the language; it tests your ability to think out of the box and come up with the best solutions. With varying levels of difficulty, you'll be faced with a wide variety of challenges. And in case you're stumped, you don't have to worry: we've got the best solutions to the problems in the book. So are you up for the challenge?
What you will learn
- [*] Serialize and deserialize JSON and XML data
- [*] Perform encryption and signing to facilitate secure communication between parties
- [*] Embed and use SQLite databases in your applications
- [*] Use threads and asynchronous functions to implement generic purpose parallel algorithms
- [*] Compress and decompress files to/from a ZIP archive
- [*] Implement data structures such as circular buffer and priority queue
- [*] Implement general purpose algorithms as well as algorithms that solve specific problems
- [*] Create client-server applications that communicate over TCP/IP
- [*] Consume HTTP REST services
- [*] Use design patterns to solve real-world problems
Who this book is for
This book will appeal to C++ developers of all levels. There's a challenge inside for everyone.
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
-
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
- Concurrency
- Design Patterns
- Data Serialization
-
Archives, Images, and Databases
-
Problems
- 79. Finding files in a ZIP archive
- 80. Compressing and decompressing files to/from a ZIP archive
- 81. Compressing and decompressing files to/from a ZIP archive with a password
- 82. Creating a PNG that represents a national flag
- 83. Creating verification text PNG images
- 84. EAN-13 barcode generator
- 85. Reading movies from an SQLite database
- 86. Inserting movies into an SQLite database transactionally
- 87. Handling movie images in an SQLite database
-
Solutions
- 79. Finding files in a ZIP archive
- 80. Compressing and decompressing files to/from a ZIP archive
- 81. Compressing and decompressing files to/from a ZIP archive with password
- 82. Creating a PNG that represents a national flag
- 83. Creating verification text PNG images
- 84. EAN-13 barcode generator
- 85. Reading movies from an SQLite database
- 86. Inserting movies into an SQLite database
- 87. Handling movie images in an SQLite database
-
Problems
- Cryptography
- Networking and Services
- Bibliography
- Other Books You May Enjoy
Product information
- Title: The Modern C++ Challenge
- Author(s):
- Release date: May 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788993869
You might also like
book
Optimized C++
In today’s fast and competitive world, a program’s performance is just as important to customers as …
book
Functional Programming in C++
Functional Programming in C++ teaches developers the practical side of functional programming and the tools that …
book
C++ Reactive Programming
Learn how to implement the reactive programming paradigm with C++ and build asynchronous and concurrent applications …
video
Mastering C++ Standard Library Features
C++ has come a long way and has now been adopted in several contexts with the …