摘要: callocvoid * calloc ( size_t num, size_t size );Allocate space for array in memoryAllocates a block of memory for an array of num elements, each of them size bytes long, and initializes all its bits to zero.The effective result is the allocation of an zero-initialized memory block of (num * size) by 阅读全文
posted @ 2012-03-28 14:32 greencolor 阅读(251) 评论(0) 推荐(0) 编辑
摘要: pathname = /path/to/you/file/filename.txt const char * filename; if ((filename = strrchr (pathname, '/')) == NULL) { filename = pathname;} else { filename++; }filename = filename.txt 阅读全文
posted @ 2012-03-28 13:53 greencolor 阅读(112) 评论(0) 推荐(0) 编辑