Create an object of MyClass
called myObj
, and use it to set the value of myNum
to 15
.
class MyClass {
public:
int myNum;
};
int main() {
@(7) @(5);
@(5).@(5) @(1) @(2);
cout << myObj.myNum;
return 0;
}
class MyClass {
public:
int myNum;
};
int main() {
MyClass myObj;
myObj.myNum = 15;
cout << myObj.myNum;
return 0;
}