R
raphfrk
I have a string that I want to extract some fields out of.
For example
ZABDE10FGH20
ZFDSF11FGG21
(etc)
I might want to extract the 2 sets of numbers.
One option would be to use throwaway buffers.
char buffer1[6];
int num1;
char buffer[4];
int num2;
and then use
fscanf( fp , "%5s%2d%3s%d" , buffer1, num1 , buffer2, num2 );
Is there a better way to get scanf to skip lines other than having it
write them to an unused buffer ?
For example
ZABDE10FGH20
ZFDSF11FGG21
(etc)
I might want to extract the 2 sets of numbers.
One option would be to use throwaway buffers.
char buffer1[6];
int num1;
char buffer[4];
int num2;
and then use
fscanf( fp , "%5s%2d%3s%d" , buffer1, num1 , buffer2, num2 );
Is there a better way to get scanf to skip lines other than having it
write them to an unused buffer ?