I have a basic problem and am unsure of how to approach it best.
I have a file which has a header of :I have read this file and saved it to a string called readfile."hello";"my";"name";"is";"michael"
the second line also contains this data but the problem is that these words wont always appear in the same order so i need to search the first line (which is always in the right order) and assign tokens to each word.
Then i want to search the second line for occurances of the word "hello" and give it the index of 1 as well.
thus i can hypothetically construct a line of 1;2;3;4;5.
i wanted to know that strtok seems to be the best way of doing it
but how do i store the first line so that future lines in the file can use its index.
all help will be appreciated