Search:

Type: Posts; User: migf1

Search: Search took 0.01 seconds.

  1. Thread: Reading textfile

    by migf1
    Replies
    26
    Views
    2,859

    More or less like before. But instead of having...

    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]...
  2. Thread: Reading textfile

    by migf1
    Replies
    26
    Views
    2,859

    You are very welcome ;) In its simplest form,...

    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...
  3. Thread: Reading textfile

    by migf1
    Replies
    26
    Views
    2,859

    If there's a maximum expected length for each...

    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...
  4. Thread: Reading textfile

    by migf1
    Replies
    26
    Views
    2,859

    Assuming you intend to use a linked list for...

    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...
Results 1 to 4 of 4