I'm writing a Todo app. It saves data in a file, formatted like this:
{item.id}: {item.title}{Unit Separator}{item.desc}
My current goal with fscanf is to incrementally check to see if the ID I wanted to assign to an item was already taken, and if so, increment current_id.
I'm using fscanf as follows:
fscanf(file_in, "%i: %s%c%s", ¤t_id) == 4
The number of formatting arguments doesn't match the number of format specifiers in the string itself.
The compiler throws a warning about this; while it runs correctly, is there a better way of doing this, perhaps another function?