You are on page 1of 3

!

"#$#$$ %

!"# !" $

!"#
$ %$ $& ' #( %( ) %* ) ( + ' (
) $

- ' ( % % $

& ( + ) ' .
& /% ) + ) $

- %* )

!$ - ' ' ( #+ ' % $

0 # # $

& ' '# *) ) ) (


$

0) % $

$- ' # % ' '


) % $

totalParticipants -= players;
cout << players << " players have finished their game. There are now
"
<< totalParticipants << " players in total." << endl;

1$ - $ )) % % (

& " '( )) )'&* &) '* +


! "#$#$$ %

#include "Cardgame.h"
#include <iostream>

using namespace std;

int Cardgame::totalParticipants = 0;

Cardgame::Cardgame(int players)
: players(players)
{
totalParticipants += players;
cout << players << " players have started a new game. There are now "
<< totalParticipants << " players in total." << endl;
}

Cardgame::~Cardgame()
{
totalParticipants -= players;
cout << players << " players have finished their game. There are now
"
<< totalParticipants << " players in total." << endl;
}

2$ 0 # # $

3$ ) # ( ! # ! #
( 3 ($ - ) ) % ) $

6$ - ) ) # # ! # "# # ! ($

4 % * # + % $
% # % )
# $5 % * #
, $

"$ )) ) * # ( ! #$ #
( 3 ($

4 * )
% & - 7' (& ) ( 8

) " '( )) )'&* &) '* +


! "#$#$$ %

9
: -
/;/-/< /4 &4:<=

> !" ? %

" " '( )) )'&* &) '* +