Bus Error
int main( int argc,char** argv ){
char pSendMsg[100];
memset(pSendMsg,0,100);
int *p1=(int*)(pSendMsg+0);
printf("correct:%d\n",*p1);
int *p2=(int*)(pSendMsg+10);
printf("error:%d",*p2);
}
当执行到printf("error:%d",*p2)一句报错Bus Error (core dumped).
为什么不可以这样用。