+ 1
Explain me this statement :- MyClass :: MyClass ( ) { }
Source and Header
2 Answers
0
Myclass() is default constructor of your class Myclass.
The expression u have written
Myclass::Myclass(){}
is the implementation of default constructor outside of the class declaration,
Myclass:: indicates that Myclass() is the member of class Myclass.
If u implement it inside class declaration, then there is no need to write Myclass::
0
This is a constructor for the class, MyClass, which is declared inside the class but defined outside the class.