
Patrick B. answered 03/03/20
Math and computer tutor/teacher
#include <iostream>
class Point
{
private:
double x;
double y;
public:
Point(double X=0, double Y=0)
{
x = X;
y = Y;
}
Point(void)
{
x=y=0;
}
};
int main()
{
Point p1(3,5);
Point p2(4);
Point p3; // causes ambiguity error... Point(void) or Point with both default arguments
}