TIENE EN SU CESTA DE LA COMPRA
en total 0,00 €
Learning C++ Doesn't Have to Be Difficult!
Have you ever wanted to learn programming? Have you ever wanted to learn the C++ language behind many of today's hottest games, business programs, and even advanced spacecraft? C++ Without Fear, Third Edition, is the ideal way to get started. Now updated for the newest C++14 standard and the free Microsoft Visual C++ Community Edition, it will quickly make you productive with C++ even if you've never written a line of code!
Brian Overland has earned rave reviews for this book's approach to teaching C++. He starts with short, simple examples you can easily enter and run. Within a couple of chapters, you'll be creating useful utilities, playing games, and solving puzzles. Everything's simplified to its essentials, patiently explained, and clearly illustrated with practical examples and exercises that help you make progress quickly.
Overland reveals the "whysö and "tricksö behind each C++ language feature. And you'll never get bogged down in complex or pointless examples: He keeps you 100% focused on learning what works and what matters-while having fun!
This new and improved edition
Covers installing and using the free Microsoft Visual C++ Community Edition-but you can use any version of C++
Explains valuable improvements in the new C++14 standard
Modularizes C++14 coverage so it's easy to write code that works with older versions
Teaches with even more puzzles, games, and relevant exercises
Offers more "whyö and "how-toö coverage of object orientation, today's #1 approach to programming
Presents more ways to use Standard Template Library (STL) code to save time and get more done
Contains an expanded reference section for all your day-to-day programming
Whether you want to learn C++ programming for pleasure or you're considering a career in programming, this book is an outstanding choice.
Preface xxiii
Acknowledgments xxix
About the Author xxxi
Chapter 1: Start Using C++ 1
Install Microsoft Visual Studio 1
Create a Project with Microsoft 2
Writing a Program in Microsoft Visual Studio 5
Running a Program in Visual Studio 5
Compatibility Issue #1: stdafx.h 6
Compatibility Issue #2: Pausing the Screen 8
If You're Not Using Microsoft 8
Advancing to the Next Print Line 12
Storing Data: C++ Variables 16
Introduction to Data Types 17
A Word about Variable Names and Keywords 26
Chapter 1 Summary 27
Chapter 2: Decisions, Decisions 29
But First, a Few Words about Data Types 29
Decision Making in Programs 31
Introducing Loops 39
True and False in C++ 46
The Increment Operator (++) 48
Statements versus Expressions 49
Introducing Boolean (Short-Circuit) Logic 51
Introducing the Math Library 55
Chapter 2 Summary 62
Chapter 3: And Even More Decisions! 65
The do-while Loop 65
Introducing Random Numbers 69
The switch-case Statement 77
Chapter 3 Summary 83
Chapter 4: The Handy, All-Purpose "forö Statement 85
Loops Used for Counting 85
Introducing the "forö Loop 86
A Wealth of Examples 88
Declaring Loop Variables "On the Flyö 92
Comparative Languages 101: The Basic "Forö Statement 96
Chapter 4 Summary 97
Chapter 5: Functions: Many Are Called 99
The Concept of Function 99
The Basics of Using Functions 101
Local and Global Variables 109
Recursive Functions 112
Games and More Games 129
Chapter 5 Summary 131
Chapter 6: Arrays: All in a Row... 133
A First Look at C++ Arrays 133
Initializing Arrays 135
Zero-Based Indexing 135
Strings and Arrays of Strings 144
2-D Arrays: Into the Matrix 152
Chapter 6 Summary 153
Chapter 7: Pointers: Data by Location 155
What the Heck Is a Pointer, Anyway? 155
The Concept of Pointer 156
Declaring and Using Pointers 158
Data Flow in Functions 165
Swap: Another Function Using Pointers 165
Reference Arguments (&) 172
Pointer Arithmetic 173
Pointers and Array Processing 175
Chapter 7 Summary 180
Chapter 8: Strings: Analyzing the Text 181
Text Storage on the Computer 181
It Don't Mean a Thing if It Ain't Got that String 183
String-Manipulation Functions 184
Reading String Input 190
Individual Characters versus Strings 197
The C++ String Class 201
Other Operations on the string Type 209
Chapter 8 Summary 210
Chapter 9: Files: Electronic Storage 213
Introducing File-Stream Objects 213
Text Files versus "Binaryö Files 222
Introducing Binary Operations 225
Chapter 9 Summary 233
Chapter 10: Classes and Objects 237
OOP, My Code Is Showing 237
What's an Object, Anyway? 238
Point: A Simple Class 241
Private: Members Only (Protecting the Data) 243
Introducing the Fraction Class 248
Inline Functions 251
Find the Greatest Common Factor 253
Find the Lowest Common Denominator 254
Chapter 10 Summary 267
Chapter 11: Constructors: If You Build It. 269
Introducing Constructors 269
Multiple Constructors (Overloading) 270
C++11/C++14 Only: Initializing Members 271
The Default Constructor-and a Warning 272
C++11/C++14 Only: Delegating Constructors 274
Reference Variables and Arguments (&) 281
The Copy Constructor 282
A Constructor from String to Fract 285
Chapter 11 Summary 286
Chapter 12: Two Complete OOP Examples 289
Dynamic Object Creation 289
Other Uses of new and delete 290
Blowin' in the Wind: A Binary Tree App 291
The Bnode Class 294
The Btree Class 296
Tower of Hanoi, Animated 302
Chapter 12 Summary 311
Chapter 13: Easy Programming with STL 313
Introducing the List Template 313
Designing an RPN Calculator 323
Correct Interpretation of Angle Brackets 333
Chapter 13 Summary 333
Chapter 14: Object-Oriented Monty Hall 335
What's the Deal? 335
TV Programming: "Good Deal, Bad Dealö 337
The Monty Hall Paradox, or What's Behind the Door? 351
Improving the Prize Manager 353
Chapter 14 Summary 356
Chapter 15: Object-Oriented Poker 359
Winning in Vegas 359
How to Draw Cards 361
The Card Class 363
The Deck Class 364
Doing the Job with Algorithms 366
The Vector Template 371
Getting Nums from the Player 372
How to Evaluate Poker Hands 378
Chapter 15 Summary 387
Chapter 16: Polymorphic Poker 389
Multiple Decks 389
Switching Decks at Runtime 391
Polymorphism Is the Answer 392
"Pure Virtualö and Other Abstract Matters 401
Abstract Classes and Interfaces 402
Object Orientation and I/O 403
A Final Word (or Two) 410
An (Even More) Final Word 411
Chapter 16 Summary 412
Chapter 17: New Features of C++14 415
The Newest C++14 Features 415
Features Introduced in C++11 422
The long long Type 422
Range-Based "forö (For Each) 433
The auto and decltype Keywords 438
The nullptr Keyword 439
Strongly Typed Enumerations 440
Raw-String Literals 443
Chapter 17 Summary 444
Chapter