通过指针变量访问整型变量

#include <iostream>
using namespace std;


int main(){
    int a=100,b=10;
    int *pointer1=&a,*pointer2=&b;
    cout<<a<<"  "<<b<<endl;
    cout<<*pointer1<<"   "<<*pointer2<<endl;
    return 0;
}

posted @ 2017-12-25 18:27  羿龙  阅读(474)  评论(0编辑  收藏  举报