📅  最后修改于: 2022-03-11 14:44:46.009000             🧑  作者: Mango
class MyClass { // The class
public: // Access specifier
MyClass() { // Constructor
cout << "Hello World!";
}
};
int main() {
MyClass myObj; // Create an object of MyClass (this will call the constructor)
return 0;
}