Why is this one showing error?

Why is this one showing error?

hi @cbcao263

abc(int x,int y=0)
	{
		cout<<"Inside Cons 2";
	}

remove y=0 this will run

by making this function you make an ambigous statement

as when you call abc obj(3)

which one should call??
as in above function second parameter is default so this may also called or previous one can be called

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.