Buontempo Frances - Introducing C++ (2026)

GuDron

dumpz.ws
Admin
Регистрация
28 Янв 2020
Сообщения
10,827
Реакции
1,644
Credits
41,256
Introducing C++ / Представляем C++
фронт.jpg
Год издания: 2026
Автор: Buontempo Frances / Буонтемпо Фрэнсис
Язык: Английский
Формат: PDF/EPUB
Издательский макет
Интерактивное оглавление
Количество страниц: 348
Описание:
You know how to code, but you’re ready to level up. You’ve heard about the power and performance of C++, a language vital to fields like AI, game development, and high-performance computing. But where do you even start? Existing resources are outdated or overly academic, or they assume a deep understanding of C. You need a guide that respects your existing skills and gets you coding fast with modern C++.
This book cuts through the noise, focusing on the essential elements of C++ with hands-on projects that quickly build your skills and confidence. Author and C++ expert Frances Buontempo gets you up to speed quickly with the latest features and best practices of the language, preparing you for more advanced exploration.
Write clean and efficient C++ code
Understand core concepts and syntax
Apply various programming approaches, from OOP to functional styles
Read and understand complex C++ definitions and resources

Вы умеете программировать, но готовы повышать свой уровень. Вы слышали о мощи и производительности C++, языка, жизненно важного для таких областей, как искусственный интеллект, разработка игр и высокопроизводительные вычисления. Но с чего вы вообще начнете? Существующие ресурсы устарели или слишком академичны, либо предполагают глубокое понимание языка C. Вам нужно руководство, которое учитывает ваши существующие навыки и поможет вам быстро писать на современном C++.
Эта книга позволяет преодолеть шум, сосредоточившись на основных элементах C++ и практических проектах, которые быстро укрепят ваши навыки и уверенность в себе. Автор и эксперт по C++ Фрэнсис Буонтемпо быстро ознакомит вас с новейшими функциями и передовыми практиками языка, подготовив к более глубокому изучению.
Пишите чистый и эффективный код на C++
Разбирайтесь в основных концепциях и синтаксисе
Применяйте различные подходы к программированию, от ООП до функциональных стилей.
Читать и понимать сложные определения и ресурсы C++
Скрытое содержимое могут видеть только пользователи групп(ы): Premium, Местный, Свои
dumpz.ws
 

GuDron

dumpz.ws
Admin
Регистрация
28 Янв 2020
Сообщения
10,827
Реакции
1,644
Credits
41,256
Foreword xiii
Preface xv
1. Hello, World! 1
Installing Tools 3
Linux and macOS 3
Windows 4
Using Your Tools 4
Running Your Program 7
Writing to the Screen 7
Using println 8
Troubleshooting 10
Using cout 11
Understanding println and cout in Depth 12
Conclusion 14
2. Variables and Keyboard Input 15
Declaring Variables 15
Character Input 16
Detecting Input Problems 18
Input of Real Numbers 18
Detecting Problems with Numbers 19
Detecting More General Problems 22
A Function for Input with Some Tests 24
Starting with a Failing Test 24
Breaking Your Code into Functions 26
Starting with a Failing Test, Again 27
Testing Bad Input 29
Refactor 31
Calling Your New Function from main 32
Understanding Variables, std::cin, and Functions in Depth 33
Clearing Input Errors 34
More on Functions 37
Conclusion 41
3. Exceptions and Expectations 43
Exceptions 43
Throwing Exceptions 46
Trying and Catching 47
Handling Exceptions with a try/catch Block 47
Expectations 49
Understanding Exceptions and Expectations in More Depth 51
Other Exception Types 52
Position of catch Blocks 54
Expected Without a Value 55
Conclusion 56
4. Using Loops, Arrays, and Vectors 59
Input of Several Numbers Using a Loop 59
A while Loop 60
Using an Array 62
Displaying and Using the Numbers 68
Using a Vector 71
Adding More Elements to a Vector 72
A Few Other Container Functions 74
Getting Several Numbers in a Vector 75
Understanding Sequential Containers in More Depth 76
Initializing Containers with an Initializer List 76
What Happens When You Add to a Vector 77
What Happens When You Delete from a Vector 78
Initializing a Vector with a Fixed Value 79
Other Sequential Containers 80
Conclusion 80
5. Using Standard Library Algorithms 83
Getting Several Numbers Into a Vector (Again) 83
Analyzing Your Numbers Using Algorithms 89
Using Predicates in Algorithms 91
Using Iterators in Algorithms 94
The Old Way to Remove Items 95
Finding an Average with an Algorithm 99
Understanding Algorithms in More Depth 103
Using for Loops 103
Binary Operators and Predicates 106
More on Iterators 107
Conclusion 107
6. Lambdas and the Ranges Library 109
Removing Negative Numbers Using a Lambda 109
Using a Lambda to Vary Behavior via std::function 111
Filtering Out Negative Numbers Using the Ranges’ View 117
Using Lambda Captures for Fun and Profit 120
Understanding Lambdas and Views in More Depth 123
Lambda Captures by Value 123
Lambda Captures by Reference 127
Composing Views 128
Lazy Views 132
Conclusion 133
7. Random Numbers 135
Generating Random Numbers 136
Writing an Overload for a Function 139
Building a Trading Game 143
Understanding Code with Random Numbers (and Vectors) in Depth 146
Using a Normal Distribution 147
Considerations for Code That Uses Random Numbers 150
Creating and Filling Vectors 154
Conclusion 156
8. Working with Files 159
Writing to a File 159
Detecting and Reporting Problems 161
Using the Filesystem Library 163
Reading from a File 165
Understanding Files in Depth 167
Different File Modes 167
Bitwise Operators and Bitmasks 169
Reading Previous Prices 171
Conclusion 175
9. Strings and Formatting 177
C-Style String Literals and Characters 177
Providing Arguments to main 179
Creating and Manipulating a std::string 180
Other Ways to Create a std::string 181
More std::string Functions 182
String Views 184
Formatting and More on std::println 187
std::format and Format Specifications 188
An Improved Trading Game 190
Understanding Strings in Depth 195
Joining std::strings Efficiently 195
Using std::println to Save to a File 196
Conclusion 198
10. Classes: Member Variables and Member Functions 201
A Simple Class 202
Private and Public Access Specifiers 205
Constructors and Destructors 208
Using the Stock Class in a std::vector 211
Introducing Classes in Depth 214
Constructors and Destructors in Depth 215
Splitting a Class Between Header and Source Files 217
Conclusion 219
11. Classes: Special Member Functions and Move Semantics 221
Copying Objects 221
Moving Objects 223
Move and Copy Assignments 225
Copies and Moves in Depth 229
How Does a std::string Work? 229
Move Constructors and Move Assignments 231
Copy Constructors and Copy Assignments 232
Conclusion 233
12. Memory Management with std::unique_ptr 235
Creating a std::unique_ptr 236
Using a std::unique_ptr 238
Smart Pointers in Depth 239
More on Pointers and References 239
Unique Pointers in More Detail 241
Other Smart Pointers 243
Custom Deleters 244
Using a std::unique_ptr in a Class 245
Using the Exchange Class 249
Conclusion 252
13. Classes: Virtual Functions and Inheritance 253
Base Class and Derived Classes 254
Defining an Abstract Base Class 254
A Derived Class 255
Using Derived Classes 258
A New Trading Game 261
Adding Another Derived Type 264
Virtual Functions and Inheritance in Depth 271
Virtual Destructors 271
Virtual Functions and Slicing 273
Conclusion 275
14. Using std::variant and std::visit 277
Creating and Using a std::variant 278
Using a std::variant in std::visit 281
Using the Event in the Trading Game 284
The std::variant in Depth 287
Spotting and Handling Potential Problems with std::variant 288
Using std::eek:ptional and std::any 289
Conclusion 291
15. Templates and std::unordered_map 293
Making a Lookup Table 293
Write Your Own Template 295
Specializing std::hash 299
Adding an Equality Operator for an Event 302
Adding a Way to Display the Events 304
Keeping a Tally of Events in Your Trading Game 306
Associative Containers and Templates in Depth 309
More on Templates 311
Conclusion 314
Index 315