M
Materialised
I have been given the task, of developing a program to sit next to a cgi
based c program (I know this is offtopic but my question does only refer
to the standard c part of the code).
Basically what the program needs to do, is open a text file, containing
hundreds maybe even thousands of items, and remove duplicate items.
Also if the line length exceds a certian amount of characters, I wish to
remove it.
I was thinking of using malloc to create a dynamically generated array
to load the elements into, then loop through them all removing duplicate
items.
This seems a little resource heavy considering the size of the file I am
dealing with. Does anyone have any suggestions on how to better handle
the task at hand?
Thanks in advance
Mick
based c program (I know this is offtopic but my question does only refer
to the standard c part of the code).
Basically what the program needs to do, is open a text file, containing
hundreds maybe even thousands of items, and remove duplicate items.
Also if the line length exceds a certian amount of characters, I wish to
remove it.
I was thinking of using malloc to create a dynamically generated array
to load the elements into, then loop through them all removing duplicate
items.
This seems a little resource heavy considering the size of the file I am
dealing with. Does anyone have any suggestions on how to better handle
the task at hand?
Thanks in advance
Mick