Can anyone give me a general idea on searching structs in files?
Let's say I have a struct-type "flower".
Now suppose I want to search a file filled with these structs by "common_name" so that I may obtain the "scientific_name" of that flower. Or perhaps search all structs of a certain "color" in order to print out the "common_name"s of all matching flowers.PHP Code:
First of all, I do not understand how, if at all, these structs are distinguished at all from simply plain data, since opening a plain-text file of a group of these structs simply shows data, without any "markings" indicating they ARE indeed structs...? Very weird.
So I am guessing I will have to master "fseek()", "ftell()", et al, in order to "impose" a distinguishability between plain data and structs stored in files, but all the books I have just gleen over this information very quickly.
Anyway, that's a long-winded explanation of this newbies current difficulties.
All, advice, examples, and dissertations are welcome, no matter how abstract!