The former set of braces is the initializer for number
, the latter is the compound statement that defines the body of the constructor. With proper formatting, this may become clearer.
NumberGrabber()
: number{5}
{
}
Does that make more sense?