# include <iostream>
# include <stdio.h>
using namespace std;
enum string
{
x1,x2,x3=10,x4,x5,
}X;
int main()
{
cout << x1 << x5<<endl;
unsigned char *p1;
unsigned long *p2;
p1 = (unsigned char *)0x801000;
p2 = (unsigned long *)0x801000;
printf("%p\n",p1+5);
printf("%p\n",p2+5);
char * t [] = { "abc","daa","caa"};
char **bb = t;
cout << *(bb+1) <<endl;
cout << sizeof(t)<<endl;
return 0;
}
运行结果为
0 12 //X1 X5
00801005 //P1+5
00801014 //P1 +5*sizeof(long)
daa //bb = t , bb+1 -> t+1; *(b+1) = t[1]
12 // sizeof(char *)*3