What is the difference between doing:
(做的有什么区别:)
ptr = (char **) malloc (MAXELEMS * sizeof(char *));
or:
(要么:)
ptr = (char **) calloc (MAXELEMS, sizeof(char*));
When is it a good idea to use calloc over malloc or vice versa?
(什么时候使用calloc而不是malloc是一个好主意,反之亦然?)
ask by user105033 translate from so