Hi all,
I have a file of thousand of lines and with some numbers on every lines as:
161 110 139 139 161 139 110 161 161 110 161 195 220 139 139 139 161
208 139 69 110 139 110 139 161 161 110 139 139 179 139 161 139 110
425 429 451 423 465 395 472 448 416 507 466 464 432 463 494 458 484
...
...
...
289 248 220 161 161 110 179 139 139 110 110 161 161 139 161 139 179
366 364 340 256 283 208 240 208 195 208 179 208 208 195 220 208 264
271 300 347 300 304 294 337 294 277 309 300 326 314 309 322 277 283
I can't know how much lines I have.
Ihave simply to put all the values in a NxM matrix of float.
I can't solve on how to find the end of line without using chars...
This is the code I used:
while(res=fscanf(pFile, "%f",&value)!=EOF){
while(res!="\n"){
printf ("%d",(int)*value);
res=fscanf(pFile, "%f",&value);
}
printf("\n");
}
it doesn't work! res cannot be compared to "\n"...