C语言降龙十八掌——第五掌 布尔类型是什么类型?
C语言降龙十八掌——第五掌布尔类型是什么类型?大家看一看,这段代码有什么问题?......char*buffer;/*Allocate memory with function of standard lib */buffer =malloc (SIZE_OF_BUF);/* Checkif the memory allocate success, if no, then output error information and return*/if(!buffer){ printf (“Memory allocate fail\n”); return -1;}......这段代码有什么潜在的问题呢?提醒一下,大家可以参考Ansi C标准中对于布尔变量的定义。
[ 本帖最后由 richiefang 于 2010-2-28 01:38 编辑 ]