∷ 性别:
∷ 状态:
|
|
|
|
|
|
|
|
|
|
|
5come5帮你背单词 [ sanitary /'sænitəri/ a. 神智清楚的,心理健全的
]
[c]为什么不做这个[屏蔽]作就会出错呢?
本帖被 zhd32 执行提前操作(2007-11-26)
RT:
#include "stdio.h" #include "malloc.h" #include "stdlib.h"
int main() { int i; unsigned char * newp; unsigned long highresult=0x12345678;
newp=(unsigned char *)malloc(4*sizeof(unsigned long)); if (NULL==newp) { printf("NUll!!!!!!!"); } else { newp=(char *)&highresult; }
for(i=0;i<4;i++) { printf("%02x\n",*newp); newp++; }
newp=NULL; //为什么不做这个操作就会出错呢?
free(newp); return 0; }
[ 此帖被springdew在2007-11-23 13:17重新编辑 ]
|