I'm learning c++ and I was looking at the following webpage:
http://msdn.microsoft.com/en-us/library/vstudio/bb384842.aspx
The code given on that page contains the following line of code under step 7.
Cardgame::Cardgame(int players)
: players(players)
{
totalParticipants += players;
cout << players << " players have started a new game. There are now "
<< totalParticipants << " players in total." << endl;
}
As I understand it, the first line corresponds to an object constructor which takes a single integer argument. However, I don't understand the line directly after it
: players(players)
What does this notation mean? Could someone please explain this to me in as simple a way as possible?