Excerpt
IntroductionIntroduction
This book is designed to help you teach yourself how to program with C++. Just as you can learn to walk one step at a time, you can learn to program in C++ one hour at a time. Each lesson in this book has been designed so that you can read the entire lesson in just an hour a day. It lays emphasis on the practical usage of the language, and helps you get up-to-speed with concepts that are most important in writing C++ applications for real-world usage.
By focusing for just an hour a day at a time, you'll learn about such fundamentals as managing input and output, loops and arrays, object-oriented programming, templates, using the standard template library, and creating C++ applicationsall in well-structured and easy-to-follow lessons. Lessons provide sample listingscomplete with sample output and an analysis of the codeto illustrate the topics of the day.
To help you become more proficient, each lesson ends with a set of common questions and answers, a quiz, and exercises. You can check your progress by examining the quiz and exercise answers provided in Appendix D, "Answers."
Who Should Read This Book
You don't need any previous experience in programming to learn C++ with this book. This book starts you from the beginning and teaches you both the language and the concepts involved with programming C++. You'll find the numerous examples of syntax and detailed analysis of code an excellent guide as you begin your journey into this rewarding environment. Whether you are just beginning or already have some experience programming, you will find that this book's clear organization makes learning C++ fast and easy.
Organization of This Book
This is a book that appeals as much to a beginner in the language as it does to someone who wishes to understand C++ again, but from a more practical perspective. It is hence divided into five parts:
Part I, "The Basics," introduces C++, and its syntactical details. This is very useful for absolute beginners who would first like to understand the basics of programming in C++.
Part II, "Fundamentals of Object-Oriented Programming and C++," introduces the object-oriented features of C++those that set it apart from its predecessor C. This section lays the foundation for a more practical view of the language and one of its most powerful utilities, the standard template library.
Part III, "Learning the Standard Template Library (STL)," gives you a close look at how C++ is used in real-life practical applications where quality of your application can be vastly improved by using readily available, standard-compliant constructs.
Part IV, "More STL," introduces you to algorithms such as sort and other STL constructs that help streamline your application and increase its reliability.
Part V, "Advanced C++ Concepts," discusses details and features of the programming language that not every application built using it needs to have, yet, knowing them can help in error analysis or in writing better code.
Conventions Used in This Book
Within the lessons, you'll find the following elements that provide additional information:
Tip - These boxes highlight information that can make your C++ programming more efficient and effective.
Note - These boxes provide additional information related to material you just read.
FAQ - What do FAQs do?
Answer: These Frequently Asked Questions provide greater insight into the use of the language and clarify potential areas of confusion.
Caution - These focus your attention on problems or side effects that can occur in specific situations.
These boxes provide clear definitions of essential terms.
DO use the "Do/Don't" boxes to find a quick summary of a fundamental principle in a lesson.
DON'T overlook the useful information offered in these boxes.
This book uses various typefaces to help you distinguish C++ code from regular English. Actual C++ code is typeset in a special monospace font. Placeholderswords or characters temporarily used to represent the real words or characters you would type in codeare typeset in italic monospace. New or important terms are typeset in italic.
Sample Code for This Book
The code samples in this book are available online for download from the publisher's website.
© Copyright Pearson Education. All rights reserved.