#include <iostream>

struct Reading {
    int value;

    void set(int next) {
        this->value = next;
    }

    int read() {
        return this->value;
    }
};

int main() {
    Reading a{4};
    Reading b{9};
    Reading* p{&a};
    std::cout << a.read() << ' ' << b.read() << '\n';
    p->set(7);
    std::cout << a.read() << ' ' << b.read() << '\n';
    return 0;
}
