UGameUserSettings. Calling virtual function from constructor

In this example, SetToDefaults is overriden in the child class (B) such that when B::SetToDefaults is called, it first calls A::SetToDefault followed by the additional printf in your overriden function (line 27 above). However, you are not actually calling your B::SetToDefaults function. When an object of type B is created, you are calling the parent implementation rather than your child implementation (A::SetToDefaults). For the results you are looking for, you would need to use

B() 
{ 
     SetToDefaults(); 
}

This will call B::SetToDefaults when you create object B, which will in turn call A::SetToDefaults.