how to parse log files using structures or enum
shkr
0
Newbie Poster
Recommended Answers
Jump to PostYou don't. You parse a file by reading it and breaking the line read into fields. Then you can store it in your structure.
Jump to PostIt depends on how the log file was written. If it is in binary mode and written with fwrite() then you can use fread() to read each record directly into the structure. Otherwise if its text mode and written with fprintf() then use fgets() to read it and pars the …
All 5 Replies
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Sokurenko
42
Junior Poster
shkr
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.