c1是指针,&c1就是二重指针。就算是编译过去了,也是错误的代码
C代码和汇编对照看
[code]
char c1[] = { 'a', 'b', 'c', 'd', 'e' };
00399652 mov byte ptr [c1],61h
00399656 mov byte ptr [ebp-0Fh],62h
0039965A mov byte ptr [ebp-0Eh],63h
0039965E mov byte ptr [ebp-0Dh],64h
00399662 mov byte ptr [ebp-0Ch],65h
//int myInt = *(int*)(&c1);
int myInt2 = *(int*)(&c1[5]);
00399666 mov eax,1
0039966B imul ecx,eax,5
0039966E mov edx,dword ptr c1[ecx]
00399672 mov dword ptr [myInt2],edx
int myInt1 = *(int*)(&c1 + 1);
00399675 mov eax,dword ptr [ebp-0Bh]
00399678 mov dword ptr [myInt1],eax
[/code]
--
FROM 125.35.122.*