c++官方文档-指针

#include<stdio.h>
#include<iostream>
#include<queue>
#include<map>
#include<memory.h>
#include <math.h>
#include <stdlib.h>
#include <algorithm>
#include <climits>
#include <sstream>
#include <cstdlib>
#include<array>
using namespace std;

int main()
{
    /**
     *
     *  *p++   // same as *(p++): increment pointer, and dereference unincremented address
     *  *++p   // same as *(++p): increment pointer, and dereference incremented address
     *  ++*p   // same as ++(*p): dereference pointer, and increment the value it points to
     *  (*p)++ // dereference pointer, and post-increment the value it points to
     */
    int jj = -1;
    int j = 1;
    cout<<&j<<endl;
    cout<<&jj<<endl;
    int * p=&j;
//    int k = *p++;
    int k = *++p;
    cout<<p<<endl;
//    int k = ++*p;
//    int k = (*p)++;
    cout<<k<<endl;
    return 0;
}

++的操作高于*

原文地址:https://www.cnblogs.com/shuiyonglewodezzzzz/p/8151923.html