∷ 性别:
∷ 状态:
|
|
|
|
|
|
|
|
|
|
|
5come5帮你背单词 [ petty /'peti/ 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重新编辑 ]
|