Hi, I'm trying to read a file which uses 2 colons as a delimiter using fscanf. Example:
Input
:watermelon::a tasty fruit::potato::a vegetable::
Each of the produce and definitions are delimited by a colon. I'm trying to iterate through this list so that I can print out the definitions and output.
Output: (through a printf)
watermelon
a tasty fruit
potato
a vegetable
I'm not sure how to do the iterations through a while loop and it's just printing watermelon over and over again at the moment.
Thanks for your help!