Beginning Programming with C++ For Dummies
Реклама. ООО «ЛитРес», ИНН: 7719571260.
Оглавление
Davis Stephen R.. Beginning Programming with C++ For Dummies
Introduction
Part I. Getting Started with C++ Programming
Chapter 1. What Is a Program?
Chapter 2. Installing Code::Blocks
Chapter 3. Writing Your First Program
Part II. Writing a Program: Decisions, Decisions
Chapter 4. Integer Expressions
Chapter 5. Character Expressions
Chapter 6. if I Could Make My Own Decisions
Chapter 7. Switching Paths
Chapter 8. Debugging Your Programs, Part I
Part III. Becoming a Procedural Programmer
Chapter 9. while Running in Circles
Chapter 10. Looping for the Fun of It
Chapter 11. Functions, I Declare!
Chapter 12. Dividing Programs into Modules
Chapter 13. Debugging Your Programs, Part 2
Part IV. Data Structures
Chapter 14. Other Numerical Variable Types
Chapter 15. Arrays
Chapter 16. Arrays with Character
Chapter 17. Pointing the Way to C++ Pointers
Chapter 18. Taking a Second Look at C++ Pointers
Chapter 19. Programming with Class
Chapter 20. Debugging Your Programs, Part 3
Part V. Object-Oriented Programming
Chapter 21. What Is Object-Oriented Programming?
Chapter 22. Structured Play: Making Classes Do Things
Chapter 23. Pointers to Objects
Chapter 24. Do Not Disturb: Protected Members
Chapter 25. Getting Objects Off to a Good Start
Chapter 26. Making Constructive Arguments
Chapter 27. Coping with the Copy Constructor
Part VI. Advanced Strokes
Chapter 28. Inheriting a Class
Chapter 29. Are Virtual Functions for Real?
Chapter 30. Overloading Assignment Operators
Chapter 31. Performing Streaming I/O
Chapter 32. I Take Exception!
Part VII. The Part of Tens
Chapter 33. Ten Ways to Avoid Bugs
Chapter 34. Ten Features Not Covered in This Book
About the Author
Dedication
Author’s Acknowledgments
WILEY END USER LICENSE AGREEMENT
Отрывок из книги
Welcome to Beginning Programming with C++ For Dummies, Second Edition. This book is intended for the reader who wants to learn to program.
Somehow over the years, programming has become associated with mathematics and logic calculus and other complicated things. I never quite understood that. Programming is a skill like writing advertising or drawing or photography. It does require the ability to think a problem through, but I’ve known some really good programmers who had zero math skills. Some people are naturally good at it and pick it up quickly, others not so good and not so quick. Nevertheless, anyone with enough patience and “stick-to-itiveness” can learn to program a computer. Even me.
.....
The program starts with Step 1 just as before, and grabs a wrench. In the second step, however, before the program waves the wrench uselessly around an empty bolt, it checks to see if a lug nut is present. If so, flow continues with Steps 3, 4, and 5 as before. If not, however, program flow skips these unnecessary steps and goes straight on to Step 7 to return the wrench to the toolbox.
In computerese, you say that the program executes the logical expression “is lug nut present?” This expression returns either a true (yes, the lug nut is present) or a false (no, there is no lug nut there).
.....