编辑代码

#include <iostream>
// Type your code here, or load an example.

using namespace std;
class A{
    public:
        int i;
        void f();    
};

void A::f(){
    i = 20;
    cout << i << endl;
}

int main( ) {
    A a;
    cout << a.i << endl;
    a.f();

 //   cout << &A;
    cout << &a << endl;
    cout << &a.i << endl;
}