< Previous | Contents | Next >

B

badSwap() function, 193–194,

236–237

base class

constructors, 343–344, 379

destructors, 379

member functions, 340–346 base class constructors,

343–344

calling, 345–346

declaring virtual, 344 Overriding Boss program,

341–343

overriding virtual, 344–345

pointers, 350–351

begin()vector member function, 127, 135

Blackjack game, 356–379

Card class, 361–363

Deck class, 370–373

designing classes, 356–360

Game class, 373–376 GenericPlayer class, 366–367 Hand class, 363–366

House class, 369–370

main() function, 376–377 overloading the operator()

function, 377–379 planning game logic, 360–361 Player class, 368–369

block, 8, 37

body of function, 8

bool fullScreen parameter, 171

bool IsBusted() const member, BlackJack GenericPlayer class, 359

bool m_IsFaceUp member,

BlackJack Card class, 359

bool type, 18, 19tbl, 37–38

bool variables, 39, 78

Boole, George, 38

Boolean variables, 22

bounds checking, 93,

100–101, 111

branching, 40–54

if statement, 40–51

with else clauses, 45–51 nesting, 44–45

relational operators, 44 Score Rater program, 41–42 true and false values,

42–43

switch statement, 51–54 creating ways to branch, 54 Menu Chooser program,

52–53

break statement, 79, 111

exiting loop, 60

Finicky Counter program, 58–60

loops, 77

switch statement and, 51 understanding when to use, 61 while (true) loop, 60

busting, BlackJack, 356