Professional Documents
Culture Documents
Beginning C23 7Th Edition Ivor Horton 2 Full Chapter
Beginning C23 7Th Edition Ivor Horton 2 Full Chapter
Beginning C23 7Th Edition Ivor Horton 2 Full Chapter
Horton
Visit to download the full and correct content document:
https://ebookmass.com/product/beginning-c23-7th-edition-ivor-horton-2/
Ivor Horton and Peter Van Weert
Beginning C++23
From Beginner to Pro
7th ed.
Ivor Horton
Stratford-upon-Avon, Warwickshire, UK
© Ivor Horton and Peter Van Weert 2014, 2018, 2020, 2023
This work is subject to copyright. All rights are solely and exclusively
licensed 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.
The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress
Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
For my wonderful family. For all your love and support.
—Peter Van Weert
In memory of my wife, Eve
—Ivor Horton
Introduction
Welcome to Beginning C++23. This book is a revised and updated
version of Ivor Horton’s original one called Beginning ANSI C++. It
teaches the essentials of the C++ language and Standard Library
features. We’ll start with the basics and gradually guide you to the point
where you can write your own C++ applications. We by no means aim
to cover every single advanced language feature—properly explaining
those you’ll need daily will serve you much better—nor could we
possibly explore all nooks and corners of C++’s vast and ever-growing
Standard Library. Regardless, with the firm foundations and knowledge
you’ll get from this book, you should have no difficulty extending the
depth and scope of your C++ expertise going forward.
We assume no prior programming knowledge. If you are keen to
learn and have an aptitude for thinking logically, getting a grip on C++
will be easier than you might imagine. By developing C++ skills, you’ll
be learning a language that is already used by millions and that
provides the capability for application development in just about any
context.
C++ is powerful. Very powerful. Arguably, more powerful even than
most programming languages. So, yes, like with any powerful tool, you
can wield some considerable damage if you use it without proper
training. We often compare C++ to a Swiss Army knife: age-old, trusted,
incredibly versatile, yet potentially mind-boggling and full of pointy
things that could really hurt you. But once someone tells you what all
those pointy things are for and teaches you some elementary knife
safety rules, you’ll never have to look for another pocket knife again.
C++ does not need to be dangerous or difficult at all. C++ today is
much more accessible than many assume. The language has come a
long way since its conception nearly 40 years ago. We’ve learned how to
wield all its mighty blades and tools in the safest and most effective way
possible. And more importantly, the C++ language and its Standard
Library have evolved accordingly to facilitate this. The past decade has
seen the rise of what is now known as modern C++. Modern C++
emphasizes the use of newer, more expressive, and safer language
features combined with tried and tested best practices and coding
guidelines. Once you know and apply a handful of simple rules and
techniques, C++ loses much of its complexity. The key is that someone
properly and gradually explains not simply what you can do with C++
but rather what you should do with C++. And that’s where this book
comes in!
With every revision of the book, we go to great lengths to keep it in
line with the new, modern era of C++ programming we’re living in. We
pick and choose those improvements and extensions to the language
that are most relevant to those beginning C++. The C++ language in this
book corresponds to the latest International Organization for
Standardization (ISO) standard, commonly referred to as C++23. The
book introduces all relevant shiny blades and pointy things C++23 has
to offer—both old and new—using many hands-on coding samples and
exercises. We’ve made sure to always explain which tool is best to use
for which purpose, why that is the case, and how to avoid getting cut.
We’ve made sure that you will begin C++ from day one, using the safe,
productive, modern programming style that employers will expect from
you tomorrow.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.