•class Foo
{
public:
Foo();
void
setValues(int a, int b=5)
protected:
int m_a, m_b;
};
void Foo::setValues(int a,
int b)
{
m_a=a;
m_b=b;
}
if we have an instance "foo" of
class "Foo" and we did the following:
•foo.setValues(4);
•it would be the same as if we had coded:
•foo.setValues(4,5);