Originally Posted by
patneva
Code:
(*grampc)->opt = (typeGRAMPCopt *)calloc(1, sizeof(*(*grampc)->opt));
if ((*grampc)->opt == NULL) {
grampc_error(OPT_ALLOC_FAILED);
}
thanks for the suggestion regarding calloc - one basic doubt here - what is significance of 1 inside calloc? Is it related to number of memory locations allocated? what if it is another variable like
Code:
*cs = (typeRNum *)calloc(size, sizeof(typeRNum));