Hello,
Just a quick question; I need a little help with fscanf.
How would you read the following line of text into a program?
Code:
4011900,"4-1.19",4.00,"01S, B19","01S, BA3T","A","0","0"
4012200,"4-1.22",4.00,"01S, B22","01S, BA2T","A","0","0"
This is an int, char, float, char, char, char, char, char. My current fscanf statement reads as follows:
Code:
fscanf( circuit_file, "%d,%[^,],%f,%[^,],%[^,],%[^,],%[^,],%[^,]", ...);
I left out the last part because I do not have any problems with my variable declarations. Where I'm running into problems is reading in "01S, B19". This should be read in as one char, but is being read in as two because of the comma and/or space. Any suggestions?
Thanks!!