In the load function, there is line where I'm assigning a pointer to another. Here is a snippet of the code used
// Declaration node *header; /* some code */ // Here is the line where i get a segmentation error pointer = header[cursor]->next;
After using gdb It turns out that the line pointer = header[cursor]->next return a SIGSEGV... I tried to initialize to NULL or to hard code a value like 0 instead of cursor.. But I have the same problem!
UPDATE 1-Cursor is an int, and pointer is a node* pointer/ 2-I've checked cursor using gdb, and it contains a valid value (0)/ 3-After the declaration, all the header[i]->next are initialized to NULL/ 4-Nothing has been malloced at header[cursor]