T
Tagore
hi,
How can I read nth column of a file.
e.g suppose format of my file is something like
Setra 40 5.0 90
Ram 50 6.4 50
Tom 45 2.3 45
.....
Now I want to read 3rd column values i.e. 5.0, 6.4, 2.3,......
I know of fscanf which can be used like
fscanf(fp,"%s %d %d ",&a,&b,&c)
but I want to read only 3rd column. How can I do this?
thanks,
How can I read nth column of a file.
e.g suppose format of my file is something like
Setra 40 5.0 90
Ram 50 6.4 50
Tom 45 2.3 45
.....
Now I want to read 3rd column values i.e. 5.0, 6.4, 2.3,......
I know of fscanf which can be used like
fscanf(fp,"%s %d %d ",&a,&b,&c)
but I want to read only 3rd column. How can I do this?
thanks,