This is an initialization list. It'll initialize the members before the constructor body is run. Consider
class Foo {
public:
string str;
Foo(string &p)
{
str = p;
};
};
vs
class Foo {
public:
string str;
Foo(string &p): str(p) {};
};
In the first example, str will be initialized by its no-argument constructor
string();
before the body of the Foo constructor. Inside the foo constructor, the
string& operator=( const string& s );
will be called on 'str' as you do str = p;
Wheras in the second example, str will be initialized directly by calling its constructor
string( const string& s );
with 'p' as an argument.