Quote:
In C++, we have a choice of syntax for initializing variables in the constuctor. The one in your snippet is called the "preamble", but it does the same thing as this:
command_struct(string x, bool a) {
name = x, msg = a;
}
Quite wrong. This code will call the default constructor for name then use the assignment operator to assign x to name. It is always better to initialize members in the initializer list. It doesn't matter for built-in types but I suggest doing it for them too to be consistent.