Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
Menu
×
×
Correct!
Exercise:
Create a constructor of MyClass, and call it:
class MyClass {
public:
@(9) {
cout << "Hello World!";
}
};
int main() {
@(7) myObj;
return 0;
}
class MyClass {
public:
MyClass() {
cout << "Hello World!";
}
};
int main() {
MyClass myObj;
return 0;
}