
The Modern C++ Challenge
Become an expert programmer by solving real-world problems
- 328 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
About this book
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.
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
Algorithms and Data Structures
Problems
45. Priority queue
- push() to add a new element
- pop() to remove the top element
- top() to provide access to the top element
- size() to indicate the number of elements in the queue
- empty() to indicate whether the queue is empty
46. Circular buffer
- Prohibit default construction
- Support the creation of objects with a specified size
- Allow checking of the buffer capacity and status (empty(), full(), size(), capacity())
- Add a new element, an operation that could potentially overwrite the oldest element in the buffer
- Remove the oldest element from the buffer
- Support iteration through its elements
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
07555 123456 => +447555123456
07555123456 => +447555123456
+44 7555 123456 => +447555123456
44 7555 123456 => +447555123456
7555 123456 => +447555123456
52. Generating all the permutations of a string
53. Average rating of movies
54. Pairwise algorithm
55. Zip algorithm
56. Select algorithm
struct book
{
int id;
std::string title;
std::string author;
};
std::vector<book> books{
{101, "The C++ Programming Language", "Bjarne Stroustrup"},
{203, "Effective Modern C++", "Scott Meyers"},
{404, "The Modern C++ Programming Cookbook", "Marius Bancila"}};
auto titles = select(books, [](book const & b) {return b.title; });
57. Sort algorithm
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
- Math Problems
- Language Features
- Strings and Regular Expressions
- Streams and Filesystems
- Date and Time
- Algorithms and Data Structures
- Concurrency
- Design Patterns
- Data Serialization
- Archives, Images, and Databases
- Cryptography
- Networking and Services
- Bibliography
- Other Books You May Enjoy