#include <iostream> class MyClass { public: void set(int x) { this->x = x; } void show() { std::cout << this->x << std::endl; } private: int x; }; int main() { MyClass obj; obj.set(5); obj.show(); return 0; }