C++ Brain Teasers: Exercise Your Mind 🔍
Anders Schau Knatten The Pragmatic Bookshelf, LLC, 1, 2024
英语 [en] · EPUB · 2.4MB · 2024 · 📘 非小说类图书 · 🚀/lgli/lgrs/zlib · Save
描述
C++ is famous for getting all the default behaviors wrong and for sometimes making demons fly out of your nose. Through 25 puzzles, from the useful to the outright weird, we explore some of C++'s most interesting quirks. How does initialization actually work? Do temporaries even exist? Why is `+!!"" ` a valid expression in C++? As you work through each puzzle, you will peel off some of the layers of complexity of C++, getting a fundamental understanding of how the language works. This will help you write better code and recognize issues more easily while debugging. Each puzzle in the book is a complete, seemingly simple C++ program, but can you figure out the output for each, or will the answers stump you? Most of the programs compile and have deterministic, though sometimes surprising, output. Some might, however, have undefined behavior, where anything can happen, including making demons fly out of your nose! Yet others might have unspecified behavior with output that is not completely deterministic; we just know nothing as bad as nasal demons will happen. All puzzles are accompanied by detailed discussions, taking a look under the hood at what exactly is going on to help you understand more about C++'s unexpected behaviors, as well as fundamental concepts like initialization, overload resolution, and implicit conversions. For the non-deterministic cases, we'll explore some typical behaviors one can expect to see in practice, what causes them, and why they shouldn't be relied on. After working through the book, you'll have tools and techniques to help you write better and safer code, and a better understanding of the fundamentals of the language, the background for some of C++'s apparent weirdness, and a better feel for identifying bugs and unsafe code in your own programs. What You Need: The book assumes basic knowledge of C++. If you want to run the programs yourself, you can use either a local C++ compiler or the online compilers at https: //godbolt.org.
备用文件名
lgrsnf/sanet.st_C++ Brain Teasers-9798888650981.epub
备用文件名
zlib/no-category/Anders Schau Knatten/C++ Brain Teasers_30067570.epub
备用出版商
Pragmatic Programmers, LLC, The
备用出版商
GLOBAL ENTERTAINMENT SRL
备用版本
United States, United States of America
备用版本
Italy, Italy
元数据中的注释
Published: July 9, 2024 | Version: P1.0 (June 2024)
备用描述
Foreword by Olve Maudal
Acknowledgments
Preface
How to Use This Book
Undefined Behavior
Unspecified and Implementation-Defined Behavior
Playing Around with the Code
Part I. C++ Brain Teasers
Puzzle 1. How Many Degrees?
Puzzle 2. String Theory
Puzzle 3. Hack the Planet!
Puzzle 4. Going Global
Puzzle 5. A Destructive Relationship
Puzzle 6. Who’s Up First?
Puzzle 7. All Good Things Must Come to an End
Puzzle 8. Will It Move?
Puzzle 9. Counting Copies
Puzzle 10. A Strange Assignment
Puzzle 11. What’s the Time of Death?
Puzzle 12. A False Start
Puzzle 13. A Constant Struggle
Puzzle 14. Aristotle’s Sum of Parts
Puzzle 15. Back from the Future
Puzzle 16. An Overloaded Container
Puzzle 17. A Strong Point
Puzzle 18. Moving Out
Puzzle 19. A Little Sum Thing
Puzzle 20. Monsters on the Move
Puzzle 21. Sizing Up Some Characters
Puzzle 22. The Phantom Spaceship
Puzzle 23. Off to a Good Start
Puzzle 24. A Specialized String Theory
Puzzle 25. Weakly Typed, Strongly Puzzling
开源日期
2024-09-11
更多信息……
We strongly recommend that you support the author by buying or donating on their personal website, or borrowing in your local library.

🚀 快速下载

成为会员以支持书籍、论文等的长期保存。为了感谢您对我们的支持,您将获得高速下载权益。❤️

🐢 低速下载

由可信的合作方提供。 更多信息请参见常见问题解答。 (可能需要验证浏览器——无限次下载!)

所有选项下载的文件都相同,应该可以安全使用。即使这样,从互联网下载文件时始终要小心。例如,确保您的设备更新及时。
  • 对于大文件,我们建议使用下载管理器以防止中断。
    推荐的下载管理器:JDownloader
  • 您将需要一个电子书或 PDF 阅读器来打开文件,具体取决于文件格式。
    推荐的电子书阅读器:Anna的档案在线查看器ReadEraCalibre
  • 使用在线工具进行格式转换。
    推荐的转换工具:CloudConvertPrintFriendly
  • 您可以将 PDF 和 EPUB 文件发送到您的 Kindle 或 Kobo 电子阅读器。
    推荐的工具:亚马逊的“发送到 Kindle”djazz 的“发送到 Kobo/Kindle”
  • 支持作者和图书馆
    ✍️ 如果您喜欢这个并且能够负担得起,请考虑购买原版,或直接支持作者。
    📚 如果您当地的图书馆有这本书,请考虑在那里免费借阅。