You must declare a constructor in your class if you want to provide a definition for it. You do only the second thing.
In addition, the original class definition contains some errors: parentheses are not required after the class name, and a semicolon is required after the final brace.
class someclass { someClass();
source share