+ 1
What are the difference Between " Struct list *file ;" and "Struct list *file = malloc(sizeof(*file));" ?
5 Respostas
+ 2
~ swim ~ Sorry, I read it as struct list *file = malloc(sizeof(file));
In my defence, it's pretty weird. struct list *file = malloc(sizeof(struct list)) is much more common.
+ 1
The difference is that the second example is wrong.