Default Arguments
The use of default arguments can greatly reduce the amount of code in a class.
class box {public: box (int v = 7) : val(v) { } void test (int v = 3, double d) { val = v + (int) d; } private: int val;};box aBox(3); // explicit argumentbox bBox; // uses default value of 7aBox.text(2, 3.14); // both arguments specifiedbBox.test(2.3); // uses implicit definition for first argument