Solved

It Is Legal to Call a Constructor as a Member

Question 14

True/False

It is legal to call a constructor as a member function of an object of a class,as in
class A
{
public:
A(){}
A(int x,int y):xx(x),yy(y){}
// other members
private:
int xx;
int yy;
};
int main()
{
A w;
w.A(2,3);// Is this legal?
}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions