Cannot read a csv file containing more than 14 column

I am facing the problem to read a csv file (attach here) with 14 column. I need to make graph with column 12 and 13 (but I cannot read). It shows that “Limitaion: sscanf only takes upto 12 arguments (tmpfile)(2)”. Your kind co-operation will be appreciated. Here is the code:

[code]FILE *f= fopen(“Image_109.nap”, “r”);;
char line[300];
float v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13;
int i = 0;
TGraph *g = new TGraph();
while (fgets(line,160,f)) {
if (i>17) {
printf ("%g\t", v11);




Looking forward to hearing from you. Thanks and regards.


you can have a look to one of the many tutorials online explaining how to read an ascii file in C++, for example … ple-column which uses streams.

Thanks for your kind response. I tried lot, but did not get a way to read all column value at a time. Can you help a little bit more with specific example please or something else.