class A
{public:
A(int x, float y=0){}
A(int x , char y){}
};
int main()
{
A ob(2,2);
return 0;
}
CgoKY2xhc3MgQQp7cHVibGljOiAgCglBKGludCB4LCBmbG9hdCB5PTApe30gCglBKGludCB4ICwgY2hhciB5KXt9IAoJCgl9OwoJCgkKCWludCBtYWluKCkKCXsKCQlBIG9iKDIsMik7CgkJCgkJcmV0dXJuIDA7Cgl9
prog.cpp: In function 'int main()':
prog.cpp:14:11: error: call of overloaded 'A(int, int)' is ambiguous
A ob(2,2);
^
prog.cpp:14:11: note: candidates are:
prog.cpp:7:2: note: A::A(int, char)
A(int x , char y){}
^
prog.cpp:6:2: note: A::A(int, float)
A(int x, float y=0){}
^