Hello
I must read information form a text file and i am currently using the function strtok to separete the information that is in colums to insert it into a structure in the program.
Anyway, i think that's not the best and simple way to do it, so i wonder how it could be done.
I have something like this: (colums separate by \n and lines by \n)
field1\field2\field3\field4\n
field1\field2\field3\field4\n
field1\field2\field3\field4\n
field1\field2\field3\field4\n
Each line would be in a structure and each field in an element of each structure.
I think there must be a better way to trade with this problem as this text organization is very used in logs or small things that doesnt requiere from any BD.
Thank you