It\'s very bothersome for me to write calloc(1, sizeof(MyStruct)) all the time. I don\'t want to use an idea like wrapping this method and etc. I mean I want to
calloc(1, sizeof(MyStruct))
it is just by design.
you could write your own calloc
void *mycalloc(size_t num, size_t size) { void *block = malloc(num * size); if(block != NULL) memset(block, 0, num * size); return block; }