Member initializer syntax is a great way to give data members initial values on object initialization.
"All other things being equal, your code will run faster if you use initialization lists rather than assignment." - isocpp.org
For the purposes of this example let's pretend we have the class Cat
:
#include <iostream>
#include <string>
using namespace std;