What would be the best way to fill in a struct with data from a file?
Here are my two main proplems:
1) How to parse the data out of the file?
It will be in this format:
For example:Code:<attribute> <whitespace> = <whitespace> <value>
2) Where to store the strings? Should I malloc() them or what? Is there a nicer way?Code:myvalue = 12 thing = somestuff
Also I would make a function that would create a file from the same struct, but this should be really easy using fprintf().