Why can i declare constructor out of the class in c++
Consider this link.See this code:
class MyClass
{
public:
MyClass();
~MyClass();
private:
int _a;
};
MyClass::MyClass()
{
}
MyClass::~MyClass()
{
}
We can declare constructor out of the class in c++. Why can i declare
constructor out of the class and why we should do this?
No comments:
Post a Comment