(Ebook PDF) Starting Out With C++: From Control Structures Through Objects, Brief Version 8th Edition Download PDF
(Ebook PDF) Starting Out With C++: From Control Structures Through Objects, Brief Version 8th Edition Download PDF
com
https://ebooksecure.com/product/ebook-pdf-
starting-out-with-c-from-control-structures-
through-objects-brief-version-8th-edition/
https://ebooksecure.com/product/ebook-pdf-starting-out-with-c-from-
control-structures-through-objects-8th-edition/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-starting-out-with-java-from-
control-structures-through-objects-7th-edition/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-starting-out-with-c-from-
control-structures-to-objects-9th-edition/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-math-in-our-world-3rd-
edition-by-david-sobecki-professor/
ebooksecure.com
Diagnostic Imaging: Obstetrics 4th Edition Paula J.
Woodward Md - eBook PDF
https://ebooksecure.com/download/diagnostic-imaging-obstetrics-ebook-
pdf/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-economic-methodology-2nd-by-
marcel-boumans/
ebooksecure.com
https://ebooksecure.com/download/financial-and-managerial-accounting-
ebook-pdf/
ebooksecure.com
https://ebooksecure.com/product/child-and-adolescent-development-in-
your-classroom-topical-approach-3rd-edition-ebook-pdf/
ebooksecure.com
(eBook PDF)
https://ebooksecure.com/product/ebook-pdf-international-economics-
theory-and-policy-10th-edition/
ebooksecure.com
Communicating at Work: Strategies for Success in Business
and the Professions 11th Edition (eBook PDF)
https://ebooksecure.com/product/communicating-at-work-strategies-for-
success-in-business-and-the-professions-11th-edition-ebook-pdf/
ebooksecure.com
Contents
Preface xv
vii
viii Contents
Chapter 10 Characters, C-Strings, and More About the string Class 547
10.1 Character Testing 547
10.2 Character Case Conversion 551
10.3 C-Strings 554
10.4 Library Functions for Working with C-Strings 558
10.5 C-String/Numeric Conversion Functions 569
10.6 Focus on Software Engineering: Writing Your Own
C-String-Handling Functions 575
10.7 More About the C++ string Class 581
10.8 Focus on Problem Solving and Program Design: A Case Study 590
Welcome to the Brief Version of Starting Out with C++: From Control Structures through
Objects, 8th edition. This book is intended for use in a one or two-semester C++ programming
sequence, or an accelerated one-semester course. Students new to programming, as well as
those with prior course work in other languages, will find this text beneficial. The funda-
mentals of programming are covered for the novice, while the details, pitfalls, and nuances
of the C++ language are explored in-depth for both the beginner and more experienced
student. The book is written with clear, easy-to-understand language, and it covers all the
necessary topics for an introductory programming course. This text is rich in example pro-
grams that are concise, practical, and real-world oriented, ensuring that the student not only
learns how to implement the features and constructs of C++, but why and when to use them.
xv
Visit https://testbankfan.com
now to explore a rich
collection of testbank or
solution manual and enjoy
exciting offers!
xvi Preface
l The range-based for loop is introduced in Chapter 7. This new looping mechanism
automatically iterates over each element of an array, vector, or other collection,
without the need of a counter variable or a subscript.
l Chapter 7 shows how a vector can be initialized with an initialization list.
l The nullptr key word is introduced as the standard way of representing a null
pointer.
l Smart pointers are introduced in Chapter 9, with an example of dynamic memory
allocation using unique_ptr.
l Chapter 10 discusses the new, overloaded to_string functions for converting numeric
values to string objects.
l The string class’s new back() and front() member functions are included in
Chapter 10’s overview of the string class.
l Strongly typed enums are discussed in Chapter 11.
l Chapter 13 shows how to use the smart pointer unique_ptr to dynamically allocate
an object.
l Chapter 15 discusses the override key word and demonstrates how it can help prevent
subtle overriding errors. The final key word is discussed as a way of preventing a virtual
member function from being overridden.
In addition to the C++11 topics, the following general improvements were made:
l Several new programming problems have been added to the text, and many of the
existing programming problems have been modified to make them unique from previ-
ous editions.
l The discussion of early, historic computers in Chapter 1 is expanded.
l The discussion of literal values in Chapter 2 is improved.
l The introduction of the char data type in Chapter 2 is reorganized to use character
literals in variable assignments before using ASCII values in variable assignments.
l The discussion of random numbers in Chapter 3 is expanded and improved, with the
addition of a new In the Spotlight section.
l A new Focus on Object-Oriented Programming section has been added to Chapter 13,
showing how to write a class that simulates dice.
l A new Focus on Object-Oriented Programming section has been added to Chapter 14,
showing an object-oriented program that simulates the game of Cho-Han. The program
uses objects for the dealer, two players, and a pair of dice.
Figure P-1
Chapter 1
Introduction
Chapters 2–7
Basic Language
Elements
*A few subtopics in
Chapter 12 require
Chapter 10 Chapters 9 and 11.
Characters, Strings, Chapter 11
and the string Class Structures
Chapter 13
Introduction to
Classes
Chapter 14
More About Classes
Chapter 15
Inheritance and
Polymorphism
Chapter 1 covers fundamental hardware, software, and programming concepts. You may
choose to skip this chapter if the class has already mastered those topics. Chapters 2 through
7 cover basic C++ syntax, data types, expressions, selection structures, repetition structures,
functions, and arrays. Each of these chapters builds on the previous chapter and should be
covered in the order presented.
After Chapter 7 has been covered, you may proceed to Chapter 8, or jump to either Chapter
9 or Chapter 12. (If you jump to Chapter 12 at this point, you will need to postpone sections
12.7, 12.8, and 12.10 until Chapters 9 and 11 have been covered.)
After Chapter 9 has been covered, either of Chapters 10 or 11 may be covered. After
Chapter 11, you may cover Chapters 13 through 15 in sequence.
This text’s approach starts with a firm foundation in structured, procedural programming
before delving fully into object-oriented programming.
xviii Preface
Chapter 6: Functions
In this chapter the student learns how and why to modularize programs, using both void
and value returning functions. Argument passing is covered, with emphasis on when argu-
ments should be passed by value versus when they need to be passed by reference. Scope of
variables is covered, and sections are provided on local versus global variables and on static
local variables. Overloaded functions are also introduced and demonstrated.
Preface xix
Chapter 7: Arrays
In this chapter the student learns to create and work with single and multidimensional
arrays. Many examples of array processing are provided including examples illustrating
how to find the sum, average, highest, and lowest values in an array and how to sum the
rows, columns, and all elements of a two-dimensional array. Programming techniques using
parallel arrays are also demonstrated, and the student is shown how to use a data file as
an input source to populate an array. STL vectors are introduced and compared to arrays.
Chapter 9: Pointers
This chapter explains how to use pointers. Pointers are compared to and contrasted with
reference variables. Other topics include pointer arithmetic, initialization of pointers, rela-
tional comparison of pointers, pointers and arrays, pointers and functions, dynamic mem-
ory allocation, and more.
Chapter 10: Characters, C-strings, and More About the string Class
This chapter discusses various ways to process text at a detailed level. Library functions for
testing and manipulating characters are introduced. C-strings are discussed, and the tech-
nique of storing C-strings in char arrays is covered. An extensive discussion of the string
class methods is also given.
Appendix F: Namespaces
This appendix explains namespaces and their purpose. Examples showing how to define a
namespace and access its members are given.
KALEVALAN RUNOJEN
ALKUPERÄSTÄ
Esittänyt Väinö Salminen