CHF22.00
Download steht sofort bereit
Learn to program with C++ quickly with this helpful For
Dummies guide
Beginning Programming with C++ For Dummies, 2nd
Edition gives you plain-English explanations of the fundamental
principles of C++, arming you with the skills and know-how to
expertly use one of the world's most popular programming languages.
You'll explore what goes into creating a program, how to put the
pieces together, learn how to deal with standard programming
challenges, and much more.
Written by the bestselling author of C++ For Dummies,
this updated guide explores the basic development concepts and
techniques of C++ from a beginner's point of view, and helps make
sense of the how and why of C++ programming from the ground up.
Beginning with an introduction to how programming languages
function, the book goes on to explore how to work with integer
expressions and character expressions, keep errors out of your
code, use loops and functions, divide your code into modules, and
become a functional programmer.
Grasp C++ programming like a pro, even if you've never written
a line of code
Master basic development concepts and techniques in C++
Get rid of bugs and write programs that work
Find all the code from the book and an updated C++ compiler on
the companion website
If you're a student or first-time programmer looking to master
this object-oriented programming language, Beginning Programming
with C++ For Dummies, 2nd Edition has you
covered.
Autorentext
Stephen R. Davis is the bestselling author of numerous
books and articles, including C++ For Dummies. He has been
programming for over 35 years and currently works for Agency
Consulting Group in the area of Cyber Defense.
Zusammenfassung
Learn to program with C++ quickly with this helpful For Dummies guide
Beginning Programming with C++ For Dummies, 2nd Edition gives you plain-English explanations of the fundamental principles of C++, arming you with the skills and know-how to expertly use one of the world's most popular programming languages. You'll explore what goes into creating a program, how to put the pieces together, learn how to deal with standard programming challenges, and much more.
Written by the bestselling author of C++ For Dummies, this updated guide explores the basic development concepts and techniques of C++ from a beginner's point of view, and helps make sense of the how and why of C++ programming from the ground up. Beginning with an introduction to how programming languages function, the book goes on to explore how to work with integer expressions and character expressions, keep errors out of your code, use loops and functions, divide your code into modules, and become a functional programmer.
Inhalt
Introduction 1
About This Book 1
Foolish Assumptions 2
How This Book Is Organized 3
Part I: Getting Started with C++ Programming 3
Part II: Writing a Program: Decisions, Decisions 4
Part III: Becoming a Procedural Programmer 4
Part IV: Data Structures 4
Part V: Object-Oriented Programming 4
Part VI: Advanced Strokes 5
Part VII: The Part of Tens 5
Icons Used in This Book 5
Beyond the Book 6
Where to Go from Here 6
Part I: Getting Started with C++ Programming 7
Chapter 1: What Is a Program? 9
How Does My Son Differ from a Computer? 9
Programming a Human Computer 11
Creating the algorithm 11
Setting the tire-changing language 12
Constructing the program 13
Computer processors 17
Computer Languages 17
High-level languages 19
The C++ language 20
Chapter 2: Installing Code::Blocks 21
Reviewing the Compilation Process 21
Installing Code::Blocks 23
Windows installation 23
Ubuntu Linux installation 26
Mac OS installation 27
Setting up Code::Blocks 31
Testing the Code::Blocks Installation 33
Creating the project 34
Testing your default project 37
Chapter 3: Writing Your First Program 41
Creating a New Project 41
Filename extensions 43
Entering Your Program 44
Building the Program 46
Finding What Could Go Wrong 47
Misspelled commands 47
Missing semicolon 49
Using the Online Material 50
Running the Program 51
How the Program Works 51
The template 51
The Conversion program 53
Part II: Writing a Program: Decisions, Decisions 55
Chapter 4: Integer Expressions 57
Declaring Variables 57
Variable names 58
Assigning a value to a variable 59
Initializing a variable at declaration 60
Integer Constants 61
Expressions 62
Binary operators 62
Unraveling compound expressions 63
Unary Operators 65
The Special Assignment Operators 67
Chapter 5: Character Expressions 69
Defining Character Variables 69
Encoding characters 70
Example of character encoding 73
Encoding Strings of Characters 75
Special Character Constants 75
Chapter 6: if I Could Make My Own Decisions 79
The if Statement 79
Comparison operators 80
Say No to No braces 83
What Else Is There? 84
Nesting if Statements 86
Compound Conditional Expressions 89
Chapter 7: Switching Paths 93
Controlling Flow with the switch Statement 93
Control Fell Through: Did I break It? 96
Implementing an Example Calculator with the switch Statement 97
Chapter 8: Debugging Your Programs, Part I 101
Identifying Types of Errors 101
Avoiding Introducing Errors 102
Coding with style 102
Establishing variable naming conventions 103
Finding the First Error with a Little Help 104
Finding the Run-Time Error 105
Formulating test data 106
Executing the test cases 106
Seeing what's going on in your program 107
Part III: Becoming a Procedural Programmer 109
Chapter 9: while Running in Circles 111
Creating a while Loop 111
Breaking out of the Middle of a Loop 114
Nested Loops 117
Chapter 10: Looping for the Fun of It 121
The for Parts of Every Loop 121
Looking at an Example 123 G...