C++26 for Lazy Programmers Quick, Easy, and Fun C++ for Beginners — Third Edition — Will Briggs
C++26 for Lazy Programmers Quick, Easy, and Fun C++ for Beginners Third Edition Will Briggs
C++26 for Lazy Programmers: Quick, Easy, and Fun C++ for Beginners, Third Edition ISBN-13 (pbk): 979-8-8688-1858-5 ISBN-13 (electronic): 979-8-8688-1859-2 https://doi.org/10.1007/979-8-8688-1859-2 Copyright © 2025 by Will Briggs This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Melissa Duffy Coordinating Editor: Gryffin Winkler Cover designed by eStudioCalamar Cover image by Freepik.com Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a Delaware LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail booktranslations@springernature.com; for reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub (https://github.com/Apress). For more detailed information, please visit https://www.apress.com/ gp/services/source-code. If disposing of this product, please recycle the paper Will Briggs Lynchburg, VA, USA
To Addie: spinner of tales, both great and small.
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
(This page has no text content)
xvii About the Author Will Briggs, PhD, is a professor of computer science at the University of Lynchburg in Virginia. He has 30 years' experience teaching C++, 18 of them using earlier drafts of this book, and about as many years teaching other languages including C, JavaScript, LISP, Pascal, PHP, PROLOG, and Python. His primary focus is teaching of late while also being active in research in artificial intelligence.
xix About the Technical Reviewer Marius Iulian Mihailescu is an associate professor at the Faculty of Engineering and Computer Science, specializing in cybersecurity, artificial intelligence, machine learning, cloud computing, Internet of Things (IoT), and blockchain technologies. With a strong multidisciplinary background, he teaches a wide range of undergraduate and postgraduate courses, including functional programming with Haskell and F#, web development applications, information security systems, cloud fundamentals, blockchain technologies, Internet of Things engineering, information security management, software security, software development languages (C#, Python, Java), databases (Microsoft SQL Server, Oracle, and PostgreSQL), and software development methods. He has authored and co-authored numerous books, book chapters, research papers, and conference presentations in the fields of cybersecurity, cryptography, AI-driven cyber threat detection, quantum computing, and secure software development methodologies. His research spans both theoretical foundations and practical applications, with a particular interest in quantum cryptography, cyber threat intelligence, ethical hacking, secure cloud architectures, digital forensics, and AI- powered process optimization. He is actively involved in European research projects under Horizon Europe and European Defence Fund (EDF) frameworks, contributing as both researcher and project coordinator. He collaborates with academia, industry, and governmental institutions to design advanced cybersecurity architectures, AI models for predictive analytics, and innovative IoT solutions for smart cities and critical infrastructures. His current research interests include post-quantum cryptography, AI-driven anomaly detection, blockchain-based identity management, secure IoT frameworks, and digital twin technologies. He also mentors graduate and doctoral students in multidisciplinary projects that combine engineering, artificial intelligence, and applied information security.
xx Through his teaching, research, and innovation projects, he continues to contribute to the advancement of secure, intelligent, and resilient digital ecosystems at both national and international levels. abouT The TeChniCal RevieweR
xxi Acknowledgments Special thanks to • Apress • Microsoft • Google, for Google Fonts • Pixabay.com and contributors, especially 3D Animation Production Company/QuinceCreative (Chapter 1, bullseye), David Mark/12019 (Chapter 2, beach), Free-Photos (Chapter 2, pug), Andi Caswell/ andicaz (Chapter 6, scones), joakant (Chapter 11, tropical fish), Gerhard Janson/Janson_G (Chapter 12, UFO), 13smok (Chapter 12, alien sign), Prawny (Chapter 12, splat), Elliekha (Chapter 12, haunted house), pencil parker (Chapter 12, candy), Robert Davis/rescueram3 (Chapter 12, pumpkin photos), HolgersFotografie (Chapter 12, rubber duck) • Wikipedia Commons, including ASpiegler (Chapter 24, normal distribution)1 • OpenClipArt.org and contributors, especially Firkin (Chapter 2, flamingo), GDJ (Chapter 3, camel) • Flickr, especially Speedy McZoom (Chapter 12, jack-o-lantern art) • FreeSound.org and contributors, especially Razor5 (Chapter 2, techno music), robbo799 (Chapter 2, churChapter bells), alqutis (Chapter 12, hovercar), Berviceps (Chapter 12, splat), mistersherlock (Chapter 12, Halloween graveyard), matypresidente (Chapter 12, water drop), Osiruswaltz (Chapter 12, bump), mrose6 (Chapter 12, echoed scream), robcro6010 (Chapter 12, circus theme) • Chad Savage of Sinister Fonts for Werewolf Moon (Chapter 12) 1 License: creativecommons.org/licenses/by-sa/4.0/deed.en. No changes made.
xxii • Lazy Foo' Productions • StackOverflow.com • Hjörvar Hermannsson and Einar Egilsson of cardgames.io for images of card games and Nicu Buculei (http://nicubunu.ro/cards) for card images • Alumni, colleagues, and students who gave me reviews – you're the best! aCknowledgmenTs
Loading comments...
Reply to Comment
Edit Comment