< Previous | Contents | Next >
V
values
See also assigning values data member, accessing, 260 displaying, 22–23
references
altering, 190–191 returning from main()
assigning returning references, 202
to character variables, 21–22 to floating point variables, 21 to integer variables, 21
declaring, 19–20 defining new names
fundamental types, 18 Game Stats program, 16–17 getting user input, 23 global. See global variables initializing, 22
naming, 20–21 performing arithmetic
altering value of variable, 26 combined assignment
decrement operator, 27–28 Game Stats 2.0 program,
increment operator, 27–28 integer wrap around, 28–29
type modifiers, 18–19 understanding which types to
vector member functions, 115
vector objects, 115 vector STL container, 139 vector<Card*> m_Cards
member, BlackJack Hand class, 359
vector<Player> m_Players member, BlackJack Game class, 360
versus arrays, 146–147 calling member functions of
clear()member function, 122
declaring, 119–120
element insertion and deletion, 138
empty()member function, 122
capacity()member function, 136–137
reserve()member function, 137
Hero's Inventory 2.0 program, 117–119
looping iterators through, 126–128
altering iterator, 128 calling begin()vector
member function, 127 calling end()vector member
pop_back()member function, 122
push_back() member function, 120
size()member function, 120
virtual base class member functions, 344–345
virtual bool IsHitting() const = 0 member, BlackJack GenericPlayer class, 359
virtual bool IsHitting() const member
BlackJack House class, 360 BlackJack Player class, 359
virtual functions, 354–355, 380
void Add(Card* pCard) member,
BlackJack Hand class, 359
void AdditionalCards member,
BlackJack Deck class, 360
void Bust() const member, BlackJack GenericPlayer class, 359
void Clear() member, BlackJack
Hand class, 359
void Deal(Hand& aHand) member, BlackJack Deck class, 360
void Flip() member, BlackJack
Card class, 359
void FlipFirstCard() member,
BlackJack House class, 360
void Lose() const member,
BlackJack Player class, 359
void Play() member, BlackJack
Game class, 360
void Populate() member,
BlackJack Deck class, 360
void Push() const member,
BlackJack Player class, 359
void setDisplay prototype, 173–174
void Shuffle() member,
BlackJack Deck class, 360
void Win() const member, BlackJack Player class, 359