Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Marc Gregoire

Rating No ratings yet

Get up to date quickly on the new changes coming with C++17 Professional C++ is the advanced manual for C++ programming. Designed to help experienced developers get more out of the latest release, this book skims over the basics and dives right in to exploiting the full capabilities of C++17. Each feature is explained by example, each including actual code snippets that you can plug into your own applications. Case studies include extensive, working code that has been tested on Windows and Linux, and the author's expert tips, tricks, and workarounds can dramatically enhance your workflow. Even many experienced developers have never fully explored the boundaries of the language's capabilities; this book reveals the advanced features you never knew about, and drills down to show you how to turn these features into real-world solutions. The C++17 release includes changes that impact the way you work with C++; this new fourth edition covers them all, including nested namespaces, structured bindings, string_view, template argument deduction for constructors, parallel algorithms, generalized sum algorithms, Boyer-Moore string searching, string conversion primitives, a filesystem API, clamping values, optional values, the variant type, the any type, and more. Clear explanations and professional-level depth make this book an invaluable resource for any professional needing to get up to date quickly. * Maximize C++ capabilities with effective design solutions * Master little-known elements and learn what to avoid * Adopt new workarounds and testing/debugging best practices * Utilize real-world program segments in your own applications C++ is notoriously complex, and whether you use it for gaming or business, maximizing its functionality means keeping up to date with the latest changes. Whether these changes enhance your work or make it harder depends on how well-versed you are in the newest C++ features. Professional C++ gets you up to date quickly, and provides the ans

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A working manual for developers who already know C++ and want to write it professionally: design, memory, classes, templates, the Standard Library, and the C++17 features that change daily practice. Read it if you maintain real codebases and want fewer bugs, clearer interfaces, and modern idioms instead of textbook basics. 【Book Arc】 - **Opening (~0%–10%)**: A compressed refresher on syntax, operators, variable types, and smart pointers, framed as a "crash course" so experienced readers can recalibrate before the deeper material begins. - **Early (~10%–35%)**: Professional habits and design thinking — documenting interfaces, planning before coding, abstraction and reuse, object relationships, and avoiding needless inheritance; a chess-program design walkthrough ties the ideas together. - **Middle (~35%–50%)**: The memory and object-lifecycle core — pointer mental models, common pitfalls and leak detection, constructors and initializers, dynamic arrays, and the case for standard containers over raw pointers. - **Late (~50%–85%)**: The excerpts do not cover this span in detail; the table of contents points to classes, templates, I/O streams, and Standard Library chapters (roughly Chapters 12–21), which is where the C++17 material such as structured bindings, string_view, optional/variant/any, and the filesystem API is developed. - **Ending (~85%–100%)**: Cross-language and platform work — mixing C and C++, calling C++ from C# and Java via JNI, embedding scripts, calling assembly, plus appendices on interviews, an annotated bibliography, standard headers, and UML. 【Book Arc note】The progression is deliberate: fundamentals and design first, then memory and class mechanics, then library and modern-feature depth, then integration with the outside world. 【Key Takeaways】 - **Design precedes code** (Early): the book treats planning data structures and class relationships as a first-class step, warning that real-world hierarchies (music genres, org charts) rarely map to useful code inheritance. - **Abstraction and reuse are the two design pillars** (Early): reuse is presented with both benefits and costs, and the Standard Library is positioned as the default source of reusable, debugged components rather than something to reinvent. - **Comments carry what code cannot** (Early): return meanings, thrown exceptions, and preconditions belong in documentation; the book shows formal comment blocks for public methods and lets you judge when a comment earns its place. - **Constructor initializers are not stylistic** (Middle): members are constructed before the body runs, so initializer lists initialize rather than assign — a correctness and efficiency distinction, with explicitly deleted constructors as a related tool. - **Raw pointers are a teaching device, not a recommendation** (Middle): the Spreadsheet example deliberately uses raw pointers to show the consequences, while production advice is std::vector, std::array, and smart pointers; unique_ptr and shared_ptr ownership semantics are explained early. - **Pointer bugs fail in confusing ways** (Middle): the book stresses that memory corruption may surface as wrong results rather than crashes, and covers leak-detection tooling such as Visual C++'s debug library. - **C++17 changes everyday code** (Late): nested namespaces, structured bindings, string_view, constructor template argument deduction, parallel and generalized sum algorithms, Boyer-Moore search, filesystem, clamp, optional, variant, and any are the practical upgrade path this edition is built around. - **C++ lives inside larger systems** (Ending): chapters on C interop, JNI, C# calls, scripting, and assembly show how to integrate C++ rather than treat it as an island. 【Reading Tips】 - Skim the opening crash course if you are fluent; slow down at the design and memory chapters, where the book's professional judgment is concentrated. - Reread the chess design example after finishing later chapters — the author explicitly suggests this, since it references concepts introduced downstream. - Treat the Spreadsheet/raw-pointer material as a cautionary exercise: study it to recognize legacy code, but adopt the container-and-smart-pointer advice in your own work. - Use the C++17 feature list as a checklist against your codebase; each feature is taught by example, so type the snippets rather than only reading them. - Keep the appendices (standard headers, UML, bibliography) as reference rather than linear reading. 【Coverage Limits】 The excerpts are front-loaded: they cover the opening through roughly the midpoint in detail, while the late chapters on templates, the Standard Library, and most C++17 features are known mainly from the blurb and table of contents. Specific claims about those chapters' internal examples are not verifiable from the provided material.
Excerpt 1
ctionality means keeping up to date with the latest changes. Whether these changes enhance your work or make it harder depends on how well-versed you are in...
View in text
Excerpt 2
the return type of a method, but it does not provide a way for you to say what the returned value actually represents. For example, the declaration of the sa...
View in text
Excerpt 3
ut the innovative fully electric engine in some car models. These cars are selling well in part because the interface to use them is identical to cars with s...
View in text
Excerpt 4
he constructor. As part of creating these data members, it must call a constructor on any of them that are themselves objects. By the time you assign a value...
View in text
Excerpt 5
old version of showResult() never existed. As long as the object is a MyWeatherPrediction object, the new version is called. As a result of these changes, My...
View in text
Excerpt 6
d happen if you called the SQUARE macro with 2 + 3 instead of 5, like this: cout << SQUARE(2 + 3) << endl; You expect SQUARE to calculate 25, which it does....
View in text
Excerpt 7
exception handling via polymorphism signifi- cantly easier. For example, invalid_argument and runtime_error don’t do a very good job of capturing the file op...
View in text
Excerpt 8
e/, for a complete reference of all provided functionality. CODING PRINCIPLES The Standard Library makes heavy use of the C++ features called templates and o...
View in text
Tags
AI categories
Programming LanguageC++Software
ISBN: 1119421306
Publisher: Wrox
Publish Year: 2018
Language: English
Pages: 1176
File Format: PDF
File Size: 23.8 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…