Hello,
I am trying to build a data structure that consists of a single linked list (node_t).
That for each entry in the list contains a key and a record structure (record_t) which is also a linked list.
So conceptually:
- Item 1
- Record 1
- Record 2
- Item 2
- Record 1
- Record 2
- Record 3
and so on.
The print_list function is supposed to read through all the records in the data structure and display them.
Read through the items - while statement - commencing line 28
Read through the records - while statement - commencing line 36
but I get a build error on line 41, which is meant to advance to the next record (if it exists)
Code:
current->record = current->record.next;
Code:
|41|error: incompatible types when assigning to type ‘record_t’ from type ‘struct record *’|
I don't understand what the compiler is trying to tell me here.
Thanks
VW