++ --

#include<iostream>
using namespace std;
int main()
{
    int i, *p= &i;
    i=5;
    cout<<i<<endl;   //5
    //cout<<p<<endl;   0012FF44
    //cout<<*p++<<endl;  答案5
    //cout<<*(p++)<<endl;  答案5
    //cout<<(*p)++<<endl;  答案5
    //cout<<((*p)++)<<endl; 答案5
    //cout<<i<<endl;      6 6 6 6 6
    //cout<<++*p<<endl;      6
    //cout<<(++(*p))<<endl;  6
    //cout<<p<<endl;     0012FF44 0012FF44  
    return 0;
}

 

posted @ 2012-09-30 11:00  myth_HG  阅读(161)  评论(0编辑  收藏  举报