I'm getting this error:
warning: incompatible implicit declaration of built-in function ‘malloc’
I am trying to do this:
fileinfo_list* tempList = malloc(sizeof(fileinfo_list));
Just for the reference the struct used at hand is:
typedef struct {
fileinfo** filedata;
size_t nFiles;
size_t size;
size_t fileblock;
} fileinfo_list;
I don't see anything wrong with what I've done. I'm just creating a tempList
with the size of 1 x fileinfo_list
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…