C++ All-in-One For Dummies, 4th Edition
Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, www.wiley.com
Copyright 2021 by John Wiley & Sons, Inc., Hoboken, New Jersey
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions
.
Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit https://hub.wiley.com/community/support/dummies
.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com
. For more information about Wiley products, visit www.wiley.com
.
Library of Congress Control Number: 2020949804
ISBN: 978-1-119-60174-6
ISBN 978-1-119-60175-3 (ebk); ISBN 978-1-119-60173-9 (ebk)
C++ All-in-One For Dummies
To view this book's Cheat Sheet, simply go to www.dummies.com and search for C++ All-in-One For Dummies Cheat Sheet in the Search box.
Table of Contents
List of Tables
- Book 1 Chapter 2
- Book 1 Chapter 3
- Book 1 Chapter 4
- Book 1 Chapter 5
- Book 2 Chapter 1
- Book 3 Chapter 2
- Book 5 Chapter 2
- Book 6 Chapter 2
- Book 7 Chapter 2
List of Illustrations
- Book 1 Chapter 1
- Book 1 Chapter 2
- Book 1 Chapter 3
- Book 1 Chapter 5
- Book 1 Chapter 6
- Book 1 Chapter 7
- Book 1 Chapter 8
- Book 2 Chapter 2
- Book 2 Chapter 3
- Book 2 Chapter 4
- Book 3 Chapter 1
- Book 4 Chapter 2
- Book 4 Chapter 3
- Book 4 Chapter 4
- Book 5 Chapter 1
- Book 5 Chapter 4
- Book 6 Chapter 1
- Book 7 Chapter 3
- Book 7 Chapter 4
- Book 7 Chapter 5
Guide
Pages
Introduction
There are many general-purpose programming languages today, but few can claim to be the language of the millennium. C++ can make that claim, and for good reason:
- Its powerful. You can write almost any program in it.
- Its fast, and its fully compiled. Thats a good thing.
- Its easy to use if you have this book.
- Its object oriented. If youre not sure what that is, dont worry. You can find out about it by reading this very book youre holding.
- It supports functional programming techniques, which makes modeling math problems considerably easier and makes parallel processing easier. This book covers functional programming techniques, too.
- Its portable. Versions are available for nearly every computer.
- Its standardized. The American National Standards Institute (ANSI) and the International Standards Organization (ISO) both approve an official version.
- Its continually updated to meet the changing challenges of the computer community.
- Its popular. More people are using C++ because so many other people use it.
Sure, some people criticize C++. But most of these people dont truly understand C++ or are just having a bad day. Or both.
About This Book
This book is a hands-on, roll-up-your-sleeves experience that gives you the opportunity to truly learn C++. This edition starts out by helping you get a great C++ installation in place. A lot of readers wrote to tell me that they simply couldnt get C++ to work for them, and I listened by adding configuration instructions in Book 1, . You can find instructions for working with the Mac, Linux, and Windows throughout the book. The examples are also tested to work on all three platforms.
C++ All-in-One For Dummies, 4th Edition, is devoted to working with C++ wherever you want to use it. Book 1, even includes techniques for writing C++ code on your mobile device, although writing a complex application on your smartphone would be understandably difficult because of the small device size.
At the very beginning, I start you out from square one. I dont assume any programming experience whatsoever. Everybody has to start somewhere. You can start here. Not to brag, but you are in the hands of a highly successful C++ developer who has shown thousands of people how to program, many of whom also started out from square one.
You already know C++? This book is great for you, too, because although I start discussing C++ from the beginning, I cover the important aspects of the language in depth. Even if youve used C++ in the past, this book gets you up to speed with the latest in C++ 14 and above innovations, including C++ 20 additions. Plus, this edition of the book focuses on all the latest programming strategies while removing some of the less used functionality of the past.
If youre interested in using the time-tested Object Oriented Programming (OOP) techniques that C++ developers have used for years, then .
One of the most exciting additions to this edition is the use of functional programming techniques, which you can find in . Functional programming has become extremely popular because it makes modeling math problems significantly easier, and many people use functional programming techniques to solve modern data science problems. More important, functional programming can be a lot easier than earlier programming paradigms.
Next page