I'm using sscanf to scroll through a file. The file has 4 values divided by spaces:
92832 John Doe 23.33
the problem i'm facing is if the file has an invalid float
92832 John Doe 23/33 and i try assigning it to a variable that value is rounded down to 23.00 how do i detect if it's an invalid float? I know that sscanf returns a number of items it has successfully read i.e. with the above example it would return 4. But even with the invalid float it still returns 4 so i'm kinda stuck??