W
Warren Tang
Hello,
Does C++ allow a constructor to call another constructor of the same
class? (I am focusing on the language abilities. I know the C# language
allow this.)
The following sample can explain this question more clearer:
class MyClass
{
public:
MyClass()
{
//Do something.
}
MyClass(int a, int b)
{
//I need to call the parameter-less constructor. How?
}
Thank you for your attention.
Regards
Warren
Does C++ allow a constructor to call another constructor of the same
class? (I am focusing on the language abilities. I know the C# language
allow this.)
The following sample can explain this question more clearer:
class MyClass
{
public:
MyClass()
{
//Do something.
}
MyClass(int a, int b)
{
//I need to call the parameter-less constructor. How?
}
Thank you for your attention.
Regards
Warren