typedef struct 
    {
        char*title;
        int year;
        int length; //in minutes
    } record;
    record list[1024];
    int j;
    for(j=0;j<1024;++j)
        list[j]=NULL;
I am trying to initialize an array of struct and let each element point to null initially. gcc gives me an error "incompatible types when assigning to type 'record' from type 'void*". How could I solve it? The purpose of doing this is when I access an element I am able to see if it has data or just empty.




memset(list, '\0', sizeof(list));.memset()records, it is an array ofrecordvalues. You cannot set the elements of the array toNULLbecause they are not pointers. This is not java...