I have a file called file.txt and it has this structure:
owner_name : first_last_name
filesize : 1000
is_legal_file : yes
date : someDate
.
.
.
I want to get the value in fileSize. (1000 in this example.)
How do I get this information?
Read the file line by line until the second line, then strtok() the second line by
:and you’ll have two strings:filesizeand1000, then you could use atoi().