#include #include using namespace std; struct str { int f1; int f2; }; int main() { str s = {10, 20}; str *const p = &s; str& r = s; s.f1 = 30; p->f1 = 30; r.f1 = 30; ++s.f1; ++p->f1; ++r.f1; cout << s.f1 << "\n"; cout << p->f1 << "\n"; cout << r.f1 << "\n"; cout << &s << "\n"; cout << p << "\n"; cout << &r << "\n"; cout << &s.f1 << "\n"; cout << &p->f1 << "\n"; cout << &r.f1 << "\n"; cout << sizeof s << "\n"; cout << sizeof *p << "\n"; cout << sizeof r << "\n"; cout << sizeof s.f1<<"\n";cout << sizeof p->f1<<"\n";cout << sizeof r.f1<<"\n"; return EXIT_SUCCESS; }