I am really new to C programming and this is a part of an assignment. I am trying to read a comma separated text file in the format:
[value1], [value2]
in C and trying to pass them as string and int parameter into a function. I have tried using the sscanf() and even manipulation with fgetc() without much help. The space after the comma is proving to be a problem.
Example:
2001, 102
1314, 78
0410, 910
...
Please help me out.
Thank you.
Thanks to @rubberboots for the help.
user.dat file:
1000, 76
0095, 81
2910, 178
0001, 1
Output:
1000 76
0095 81
2910 178
0001 1