I have a Line class and a FRIEND Point class in it .The default constructor of the point class takes 2 int arguements that is x-location and y-location .
eg. Point p(10,3);
I am trying to make the default constructor for the line class which satisfies the point slope form of the Line that is the constructor for the Line class takes 2 arguements one of the type Point and the other of the form double(for slope).
But I am finding that all of the below code is working .....is it all correct ?
(0,0,0) is equals to 0 (0, 0) is also equals to 0
Read info on , operator
So both (0, 0) and (0, 0, 0) calls your "default" constructor with second parameter taking default value.
As there is no sense to convert integer (or double) I suggest to make default constructor explicit.