Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorIvor Horton, Peter Van Weert

Overview Begin to master the C++23 standard through step-by-step examples Includes modular programming, parallelism, and more Also covers arrays, lambdas, operator overloading, inheritance, virtual functions, and polymorphism About this Book Begin your programming journey with C++ , starting with the basics and progressing through step-by-step examples that will help you become a proficient C++ programmer. This book includes new features from the C++23 standard. All you need are Beginning C++23 and any recent C++ compiler and you'll soon be writing real C++ programs. There is no assumption of prior programming knowledge. All language concepts that are explained in the book are illustrated with working program examples, and all chapters include exercises for you to test and practice your knowledge. Free source code downloads are provided for all examples from the text and solutions to the exercises. This latest edition has been fully updated to the latest version of the language, C++23, and to all conventions and best practices of modern C++. This book also introduces elements of the C++ Standard Library that provide essential support for C++23. After completing this book, you will have the knowledge and skills needed to build your first C++ applications. What You Will Learn Begin programming with the C++23 standard Carry out modular programming in C++ Work with arrays and loops, pointers and references, strings, and more Write your own functions, types, and operators Discover the essentials of object-oriented programming Use overloading, inheritance, virtual functions, and polymorphism Write generic function and class templates, and make them safer using concepts Learn the ins and outs of containers, algorithms, and ranges Use auto type declarations, exceptions, move semantics, lambda expressions, and much more Who This Book Is For Programmers new to C++ and those who may be looking for a refresh primer o

AI Reading Assistant

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

AI guide
【One-Line Pitch】 A comprehensive, example-driven introduction to modern C++23 for absolute beginners and programmers seeking a thorough refresher, covering everything from fundamental data types to object-oriented design, templates, and the Standard Library. 【Book Arc】 - **Opening (~0%–17%)**: Sets the stage with the book's philosophy—no prior programming knowledge assumed—and introduces core concepts like program structure, the compilation process, and the difference between procedural and object-oriented programming. This section establishes the "how to think in C++" mindset. - **Early (~17%–33%)**: Dives into the foundational building blocks: fundamental data types (integers, floating-point, characters), how data is represented in binary and hexadecimal, and the basics of defining and using variables. This is the "grammar" of the language. - **Middle (~33%–58%)**: Expands on core language mechanics, covering control flow, functions, and the crucial topics of arrays, pointers, and references. This stage builds the practical toolkit for writing non-trivial programs and managing memory. - **Middle (~58%–75%)**: Transitions into object-oriented programming (OOP), introducing classes, operator overloading, and inheritance. This is where the paradigm shift from procedural to object-oriented thinking is fully developed. - **Late (~75%–88%)**: Covers advanced OOP features like virtual functions and polymorphism, then moves into generic programming with function and class templates, and introduces concepts for safer templates. This is the "power user" stage. - **Ending (~88%–100%)**: Focuses on modern C++ features and the Standard Library, including containers, algorithms, ranges, lambda expressions, move semantics, and exceptions. The book concludes with modular programming and parallelism, preparing you to build real applications. 【Key Takeaways】 - **No prior experience is required** (Opening): The book is explicitly designed for beginners, explaining all concepts from scratch with working examples and exercises. This makes it a true "from zero" guide. - **Understanding data representation is fundamental** (Early): The book dedicates significant time to how numbers and characters are stored (binary, hex, floating-point, Unicode). This foundational knowledge is critical for debugging and understanding type behavior. - **Mastering variables and types is the first milestone** (Early): Chapters on fundamental types cover integer literals, initialization, and arithmetic operations in depth. This ensures you build correct and efficient code from the first lines. - **Object-oriented programming is a core pillar** (Middle): The book thoroughly explains classes, objects, and operator overloading, teaching you how to model real-world entities and create custom types with intuitive behavior. - **Inheritance and polymorphism enable code reuse and flexibility** (Late): By covering virtual functions and polymorphism, the book shows how to design extensible class hierarchies, a key skill for large-scale software. - **Templates and concepts are essential for generic programming** (Late): You learn to write type-agnostic code with function and class templates, and use concepts to enforce constraints, making your generic code safer and more readable. - **The Standard Library is your toolkit** (Ending): The book introduces containers, algorithms, and ranges, showing you how to leverage pre-built, efficient solutions instead of reinventing the wheel. This is where you transition from learning syntax to writing idiomatic C++. 【Reading Tips】 - **Skim the early chapters on number representation** (Early): While important, the details of binary and hex math can be skimmed if you're already comfortable with them. Focus instead on the C++ syntax for literals and variable definitions. - **Deep-read the chapters on pointers and references** (Middle): This is often the hardest hurdle for beginners. Work through every example and exercise here, as a solid grasp is essential for everything that follows. - **Treat the OOP and template sections as a unit** (Middle–Late): Don't rush through them. The concepts build on each other; understanding classes is a prerequisite for inheritance, which is a prerequisite for polymorphism and templates. - **Use the exercises to test yourself** (Throughout): The book provides exercises at the end of each chapter. Do them—they are the best way to solidify knowledge and identify weak spots before moving on. - **Keep the compiler handy** (Throughout): This is a hands-on book. Read with a C++23 compiler open, and type out and modify the examples. Learning C++ requires active practice, not passive reading. 【Coverage Limits】 This guide is based on the book's front matter, table of contents, and introductory sections. It does not cover the detailed content of later chapters, such as specific Standard Library algorithms, advanced template metaprogramming, or the nuances of C++23 modules and parallelism.
Excerpt 1
earn the ins and outs of containers, algorithms, and ranges Use auto type declarations, exceptions, move semantics, lambda expressions, and much more Who Thi...
View in text
Page 4
t. —Peter Van Weert In memory of my wife, Eve —Ivor Horton
View in text
Page 4
Peter Van Weert In memory of my wife, Eve —Ivor Horton
View in text
Page 4
er Van Weert In memory of my wife, Eve —Ivor Horton
View in text
Page 5
15
View in text
Page 5
15
View in text
Page 5
15
View in text
Page 6
28 Zero Initialization 32 Defining Variables with Fixed Values 32 Integer Literals 32 Decimal Integer Literals 32 Hexadecimal Literals 34 Octal Literals 34 B...
View in text
Tags
AI categories
Programming LanguageC++Programming
ISBN: 1484293428
Publisher: Apress
Publish Year: 2023
Language: English
Pages: 938
File Format: PDF
File Size: 9.3 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…