You are previewing Learning to Program in C++.
O'Reilly logo
Learning to Program in C++

Book Description

Start here if you want to master C++. No experience necessary. Honestly.

  • Learn C++ from a master: how to think like a programmer!

  • A remarkable personal dialogue between a C++ expert and a novice

  • From the absolute basics to advanced topics: inheritance, polymorphism, pointers, and more.

  • Even if you have absolutely no programming experience, this book will help you truly master C++.

    You won't merely learn the basics. You'll master sophisticated, professional techniques—up to and including the effective use of encapsulation, inheritance, polymorphism, and pointers.

    You'll never find yourself copying syntax without understanding it. You'll learn to think like a programmer, engineer code that delivers great reliability and performance, and avoid the pitfalls that await every new C++ developer.

    These are powerful promises. But Learning to Program in C++ is a remarkable book.

    It's a book-length dialogue between renowned C++ developer Steve Heller and a real-life programming novice-a novice with an uncanny ability to ask the questions you'd ask-and get crystal-clear, on-target answers.

    It starts from absolute scratch, making only one assumption: you're ready to learn. And it's more like reading a novel—or participating in an intelligent discussion—than any computer book you've ever seen.

    Steve Heller's Learning to Program in C++. It's a pleasure to read. And if you pay attention, you'll walk away with a superb understanding of C++: what to do, how to do it, and above all, why.

    Previously published as Who's Afraid of C++? and Who's Afraid of More C++?: Both classic books, integrated and updated, together for the first time, at a great price!

    Table of Contents

    1. Copyright
    2. Foreword
    3. Preface
    4. Acknowledgments
    5. Letter from a Novice
    6. About the Author
    7. Introduction to Programming
      1. Definitions
      2. Baby Steps
    8. Hardware Fundamentals
      1. Definitions
      2. Objectives of This Chapter
      3. Behind the Curtain
      4. Odometer Trouble
      5. Exercises
      6. Registering Relief
      7. Review
      8. Conclusion
      9. Answers to Exercises
    9. Basics of Programming
      1. Definitions
      2. Objectives of This Chapter
      3. Speed Demon
      4. Lost in Translation
      5. What's Going on Underneath?
      6. Who's on First?
      7. Exercises, First Set
      8. A Cast of Characters
      9. A Byte by Any Other Name…
      10. Some Strings Attached
      11. Exercises, Second Set
      12. In and Out
      13. If Only You Knew
      14. While We're on the Subject
      15. Exercises, Third Set
      16. Just up the Block
      17. At the Fair
      18. Exercises, Fourth Set
      19. Review
      20. Conclusion
      21. Answers to Exercises
    10. More Basics
      1. Objectives of This Chapter
      2. Algorithmic Thinking
      3. You May Already Have Won
      4. Index Variables
      5. To Really Foul Things Up Requires a Computer
      6. Review
      7. Exercises
      8. Conclusion
      9. Answers to Exercises
    11. Functional Literacy
      1. Definitions
      2. Objectives of This Chapter
      3. Functioning Normally
      4. Using a Function
      5. The Man behind the Curtain
      6. Automatic Pilot
      7. Scoped Out
      8. Exercises, First Set
      9. Think Globally?
      10. Nesting Instinct
      11. Review
      12. Exercises, Second Set
      13. Conclusion
      14. Answers to Exercises
    12. Taking Inventory
      1. Definitions
      2. Objectives of This Chapter
      3. Pay Some Attention to the Man Behind the Curtain
      4. Taking Stock
      5. More Definitions
      6. Common Behavior
      7. Go to the Head of the class
      8. Shop till You Drop
      9. References Required
      10. Review
      11. Exercises
      12. Conclusion
      13. Answers to Exercises
    13. Stringing Along
      1. Objectives of This Chapter
      2. Playing out the string
      3. The Dynamic Duo, new and delete
      4. Caution: Construction Area
      5. Constructive Criticism?
      6. Tricky Assignment
      7. Assignment of Responsibility
      8. References Required
      9. Hello,operator?
      10. Equality Now!
      11. Review
      12. Exercises
      13. Conclusion
    14. Down the Garden Path
      1. Objectives of This Chapter
      2. Copy Cat
      3. private Property: Keep Out!
      4. First Review
      5. A String of Wins
      6. Initial Here
      7. Second Review
      8. Exercises
      9. Conclusion
      10. Answers to Exercises
    15. Stocking Up
      1. Definitions
      2. Objectives of This Chapter
      3. Taking Inventory
      4. Claiming an Inheritance
      5. A Dated Approach
      6. More Definitions
      7. Protection Racket
      8. stream of Consciousness
      9. We All stream for strstream
      10. Review
      11. Exercises
      12. Conclusion
    16. Pretty Poly
      1. Definitions
      2. Objectives of This Chapter
      3. Polymorphism
      4. Exercises, First Set
      5. Pretty Polly Morphic
      6. More Definitions
      7. Paging Miss Management
      8. Setting the Standard
      9. Base Instincts
      10. References Count
      11. Starring Sharon Sharalike
      12. For the Benefit of Posterity
      13. Review
      14. Exercises, Second Set
      15. Conclusion
    17. The Home Inventory Project
      1. Definitions
      2. Objectives of This Chapter
      3. Homing In
      4. Interface R Us
      5. What They Don't Know Won't Hurt Them
      6. A Smith and Wesson Beats Four Aces
      7. Back to the Future
      8. 'Tis a Gift to Be Simple
      9. Facing the Music
      10. Review
      11. Exercise
      12. Conclusion
    18. Homeward Bound
      1. Definitions
      2. Objectives of This Chapter
      3. Super-string Theory
      4. Home, Sweet Home
      5. Putting It All Together
      6. Round and Round We Go
      7. Review
      8. Exercises
      9. Conclusion
    19. Stealing Home
      1. Definitions
      2. Objectives of This Chapter
      3. The Final Voyage
      4. Utility Room
      5. Checking the Inventory
      6. Homing In
      7. Are We Having Fun Yet?
      8. Review
      9. Exercises
      10. Conclusion
    20. Tying up Loose Ends
      1. Operator Precedence
      2. Another Native Data Type
      3. Wrapping Up
    21. Glossary
        1. Special Characters
        2. A
        3. B
        4. C
        5. D
        6. E
        7. F
        8. G
        9. H
        10. I
        11. K
        12. L
        13. M
        14. N
        15. O
        16. P
        17. R
        18. S
        19. T
        20. U
        21. V
        22. W
        23. Y
        24. Z