n维指针用于控制权限,维数越高权限越高
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
/*
//修改变量用一级指针
//修改一级指针用二级指针
//修改二级指针用三级指针
//修改n级指针用n+1级指针
c程序分配给全局变量内存后才启动main函数
*/
int a = 1;
int* p = &a;
int b = 2;
int* p2 = &b;
void change(int *** p ){
printf( "change:%x
", p );
* p = &p2;
}
int main(){
int** pp = &p;
printf( "main:%x
", &pp);
printf( "%d
", **pp);
change(&pp);
printf( "%d
",**pp);
system( "pause");
return 0;
}