fix strsep
This commit is contained in:
parent
b464ff1541
commit
fecd2124d7
|
@ -37,14 +37,14 @@ void fillArrayWithRawData(char *rawDataFileName, long **p, int N, int M)
|
||||||
|
|
||||||
for (i = 0; i < N; i++)
|
for (i = 0; i < N; i++)
|
||||||
{
|
{
|
||||||
char *t , *c1, *c2 , *c3;
|
long t, c1, c2, c3;
|
||||||
while (fscanf(f , "%s,%s,%s,%s\n",t,c1,c2,c3))
|
while (fscanf(f, "%ld,%ld,%ld,%ld\n", &t, &c1, &c2, &c3))
|
||||||
{ // séparation valeur par virgule initiale : csv
|
{ // séparation valeur par virgule initiale : csv
|
||||||
printf("%s,%s,%s,%s",t,c1,c2,c3);
|
printf("%ld,%ld,%ld,%ld\n", t, c1, c2, c3);
|
||||||
p[i][0] = atol(t);
|
p[i][0] = t;
|
||||||
p[i][1] = atol(c1);
|
p[i][1] = c1;
|
||||||
p[i][2] = atol(c2);
|
p[i][2] = c2;
|
||||||
p[i][3] = atol(c3);
|
p[i][3] = c3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
Loading…
Reference in a new issue