< Previous | Contents | Next >
I
IDE (Integrated Development Environment), 3–4
if statements, 39–45
defining variables inside, 166 with else clauses, 48–51
creating sequence of, 50–51 Score Rater 3.0 program,
relational operators, 44 Score Rater program, 41–42 true and false values
increment operator (þþ), 27–28
indexing
arrays, 99–100 multidimensional arrays,
string objects, 93
inheritance, 331–346, 356–380
base class member functions, 340–346
calling, 345–346 calling base class constructors,
declaring virtual, 344 Overriding Boss program,
main() function, 376–377 overloading the
operator()
function, 377–379 planning game logic,
Player class, 368–369 controlling access under,
access modifiers, 339–340 Simple Boss 2.0 program,
deriving from base classes, 335–336
inherited members, 337 instantiating objects from
derived classes, 336–337 overloaded assignment
operators and copy constructors, 346–347
initialization statement, for
initializer list, 99 initializing
static data members, 272 variables, 22
inlining functions, 177–180, 268,
calling inlined functions, 179–180
specifying functions for, 179 Taking Damage program,
insert()vector member function, 130
instantiating objects, 259, 263
instructions() function
Mad Lib game, 154 Tic-Tac-Toe game, 208
int argument, 175
int GetTotal() const member,
BlackJack Hand class, 359
int GetValue() member,
BlackJack Card class, 359 integer division, 14–15
integer variables, 21 integer wrap around, 26,
integers, 14, 78 Integrated Development
intOnHeap() function, 300 Inventory Displayer program,
Inventory Pointer program, 239–240
isLegal()function, Tic-Tac-Toe game, 212–213
iterating through string objects, 93–94
iterators, 123–131
accessing member functions of vector element, 129–130
changing value of vector element, 128–129
declaring, 125–126
erase()vector member function, 130–131
Hero's Inventory 3.0 program, 123–125
insert()vector member function, 130
looping through vector, 126–128 altering an iterator, 128 calling begin()vector
member function, 127 calling end()vector
dereferencing an iterator, 128
vector member functions and, 147