Hi
I have a file like that:
1 2 3 4 5 6 7 8
and I want print on stdout:
1 3 8
in other words i want choose what print out.
I was thinking to use fscanf as:
Code:
fscanf(file_in,"%d %d %d",&a, &b,&c);
but in this way i get:
1 2 3
Is there a solution using fscanf to obtain my purpose?
Thanks
D
---------- Post updated at 11:08 AM ---------- Previous update was at 10:51 AM ----------
hi
I solved it. it enough to insert a format type indicator, something like:
fscanf(file_in,"%d %*1hd %d ",&a, &b,&c)
here the references
fscanf - C++ Reference.
D.