Dear
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) {
sscanf(&line[0],"%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g",&v1,&v2,&v3,&v4,&v5,&v6,&v7,&v8,&v9,&v10,&v11,&v12,&v13);
printf ("%g\t", v11);
g->SetPoint(i,v12,v13);
}
i++;
}
[/code]
File: http://www.filedropper.com/image114
Looking forward to hearing from you. Thanks and regards.