C++ for Lazy Programmers : Quick, Easy, and Fun C++ for Beginners
معرفی کتاب «C++ for Lazy Programmers : Quick, Easy, and Fun C++ for Beginners» نوشتهٔ Cassandra Clare و Briggs, Will، منتشرشده توسط نشر Apress در سال 2019. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Learn C++ the quick, easy, and "lazy" way. This book is an introductory programming text that uses humor and fun to make you actually willing to read, and eager to do the projects — with the popular C++ language. C++ for Lazy Programmers is a genuinely fun learning experience that will show you how to create programs in the C++ language. This book helps you learn the C++ language with a unique method that goes beyond syntax and how-to manuals and helps you understand how to be a productive programmer. It provides detailed help with both the Visual Studio and g++ compilers plus their debuggers, and includes the latest version of the language, C++17, too. Along the way you'll work through a number of labs: projects intended to stretch your abilities, test your new skills, and build confidence. You'll go beyond the basics of the language and learn how build a fun C++ arcade game project. After reading and using this book, you'll be ready for your first real-world C++ application or game project on your own. What You Will Learn Program for the first time in C++ in a fun, quick and easy manner Discover the SDL graphics and gaming library Work with SSDL, the Simple SDLwrapper library Use the most common C++ compilers: Visual Studio, and g++ (with Unix or MinGW) Practice "anti-bugging" for easy fixes to common problems Work with the debugger Acquire examples-driven concepts and ideas Build a C++-based arcade game application Apply built-in Standard Template Library (STL) functions and classes for easy and efficient programming Dip your toe in C, C++'s ancestor, still extensively used in industry Use new C++11/14/17 features including lambda functions, constexpr, and smart pointers Who This Book Is For Those who are new to C++, either as a guide for self-learners or as an accessible textbook for students in college-level courses. Table of Contents......Page 5 About the Author......Page 17 About the Technical Reviewer......Page 18 Acknowledgments......Page 19 Introduction......Page 21 A simple program......Page 26 Spacing......Page 29 ...in Visual Studio......Page 31 Compiling your program......Page 32 The files you created......Page 36 Antibugging......Page 39 ...with g++......Page 42 Cool command-line tricks......Page 43 How not to be miserable......Page 44 Shapes and the functions that draw them......Page 46 Antibugging......Page 55 consts and colors......Page 56 sout, escape sequences, and fonts......Page 60 SSDL_RenderText, SSDL_RenderTextCentered......Page 64 Images and changing window characteristics......Page 68 Antibugging......Page 74 Multiple images together......Page 76 Adding transparency with GIMP......Page 77 Sound......Page 82 Antibugging......Page 85 Variables......Page 86 Constants......Page 88 When to use constants, not literal values......Page 89 Integer division......Page 90 Assignment (=) operators......Page 91 A diving board example......Page 92 The no-worries list for math operators......Page 95 Built-in functions and casting......Page 96 Antibugging......Page 101 Mouse functions......Page 104 Antibugging......Page 107 if......Page 108 Combining conditions with &&, ||, and !......Page 111 Antibugging......Page 112 Boolean values and variables......Page 115 A hidden object game......Page 117 Keyboard input......Page 125 Antibugging......Page 127 while and do-while......Page 129 Loops with SSDL......Page 131 break and continue......Page 132 Antibugging......Page 133 for loops......Page 136 Increment operators......Page 137 An example: averaging numbers......Page 138 Antibugging......Page 140 chars and cctype......Page 142 switch......Page 147 Antibugging......Page 148 Adventures in robotic cooking......Page 150 Requirements: What do we want to do?......Page 154 Algorithm: How do we do it?......Page 155 Coding: putting it all into C++ (plus: commenting the lazy way)......Page 157 Functions that return values......Page 163 Functions that return nothing......Page 170 Global variables......Page 174 Antibugging......Page 175 How to write a function in four easy steps (and call it in one)......Page 178 Why have functions, anyway?......Page 182 Making a random number generator......Page 193 Using the built-in random number generator......Page 196 Antibugging......Page 199 Boolean functions......Page 201 & parameters......Page 202 Antibugging......Page 207 Identifier scope......Page 208 A final note on algorithms......Page 211 A flawed program......Page 212 Visual Studio......Page 217 ddd......Page 219 Visual Studio......Page 220 ddd......Page 222 Fixing the stars......Page 223 Antibugging......Page 224 Bottom-up testing......Page 225 More on antibugging......Page 226 Arrays......Page 228 Arrays’ dirty little secret: using memory addresses......Page 231 Antibugging......Page 232 Arrays as function parameters......Page 233 Array parameters and reusability......Page 234 Antibugging......Page 235 Enumeration types......Page 236 enum class......Page 238 Antibugging......Page 239 Multidimensional arrays......Page 240 Displaying the board......Page 241 Arrays of more than two dimensions......Page 244 Antibugging......Page 245 structs......Page 247 Cool struct tricks......Page 251 Making a movie with struct and while......Page 252 Sprites......Page 259 Antibugging......Page 264 Mouse......Page 265 Keyboard......Page 266 Events......Page 268 Cooldowns and lifetimes......Page 271 Collisions......Page 274 The big game......Page 275 Antibugging......Page 289 Standard I/O programs......Page 293 Compiling in Microsoft Visual Studio......Page 294 Antibugging......Page 297 Compiling with g++......Page 298 Getting the command prompt in Windows......Page 300 while (cin)......Page 302 Reading in characters, including whitespace......Page 304 Antibugging......Page 305 Using file names......Page 307 Character arrays......Page 313 Antibugging......Page 316 Dynamic allocation of arrays......Page 319 Antibugging......Page 322 Using the * notation......Page 323 Antibugging......Page 327 Writing classes......Page 329 Constructors......Page 332 Antibugging......Page 336 const objects, const member functions.........Page 338 ...and const parameters......Page 339 Copy constructors......Page 340 Default constructors......Page 341 Conversion constructors......Page 342 Antibugging......Page 343 Default parameters for code reuse......Page 344 Date program (so far)......Page 345 inline functions for efficiency......Page 348 Access functions......Page 350 Separate compilation and include files......Page 351 What happens in separate compilation......Page 352 Writing your .h file......Page 353 Including a .h file only once......Page 354 Avoid using namespace std; in include files......Page 355 Antibugging......Page 356 Multiple-file projects in Microsoft Visual Studio......Page 358 A simple version......Page 359 A better version......Page 360 Final Date program......Page 363 static members (optional)......Page 369 The basic string class......Page 372 Destructors......Page 374 Binary and unary operators......Page 375 Assignment operators and * this......Page 377 Antibugging......Page 379 Arithmetic operators......Page 380 [] and ()......Page 383 >> and
دانلود کتاب C++ for Lazy Programmers : Quick, Easy, and Fun C++ for Beginners