More or less like before. But instead of having the key part of the node you can use a local variable for it (say: key) so you can insert the node containing the info-string into the hashtable[key]...
Type: Posts; User: migf1
More or less like before. But instead of having the key part of the node you can use a local variable for it (say: key) so you can insert the node containing the info-string into the hashtable[key]...
You are very welcome ;)
In its simplest form, and judging from the sample data you provided, I can only guess that you have a relative small and finite set of keys (say from 0 to 128), then a...
If there's a maximum expected length for each line in the text file (say MAX_LNLEN), you could read lines one by one using for example...
fgets(buffer, MAX_LNLEN+1, fp)
with buffer declared as...
Assuming you intend to use a linked list for storing the processed file in memory, I would say something like the following...
struct Node {
int key;
char *info;
struct Node...