急问:这个为什么不行?# Programming - 葵花宝典
z*e
1 楼
void *t=malloc(100);
unsigned int* p=(unsigned int*)((unsigned int)t+9);
//int k=300;
//memcpy(p,&k,4);
*p=1;
直接对 *p赋值就出错,用memcpy就可以,why??
linux下run的。
unsigned int* p=(unsigned int*)((unsigned int)t+9);
//int k=300;
//memcpy(p,&k,4);
*p=1;
直接对 *p赋值就出错,用memcpy就可以,why??
linux下run的。