What's the difference between these two constructors?

I've came across these two different constructors but I'm unsure as too why they've both different. The first uses a colon after the constructor header and the second uses braces.

This is the constructor for my first class.
1
2
3
  Critter::Critter(const string& name) :
	m_Name(name)
{}


This is the constructor for my second class.
1
2
3
Farm::Farm(int spaces) {
	m_Critters.reserve(spaces);
}
So when using a constructor for just member initialization, you can use a colon followed by the members, without the need to use any statements, hence the empty braces?

Thanks for the link.
yes and np
Topic archived. No new replies allowed.