class A{ public: void foo(int x) { cout << \"foo with one\\n\"; } void foo(int x, int y=10) {
Why not?
class A{ public: void foo(int x=10, int y=10) { cout << "foo with two\n"; } };