c++ - stuck with creating node and linked-list of specific requirement -
i have requirement create linked list of m size , each node contain b size. have attached image how link list , load should , elements in it.
structure required of linked list:
can 1 can tell me how should format node meet requirement.
i not understand post 100%, based on understand , guess, got following things.
1. element head 8bit, means linked list should within 256 elements. 2. element valuelen 4bit, means value should less 16 bit
so defined structure
struct node { unsigned int nextptr:8; unsigned int key:4; unsigned int valuelen:4; unsigned int value:16; };
which have 4byte (32bit) , whole linked list should be
typedef node linkedlist[256];
total 1k bytes.
Comments
Post a Comment