hi,
I want to extract a string from a file,
if the file is like this:
1 This is the string 2 3 4
how could I extract the string, starting from the 10th position (i.e. "T")
and extract 35 characters (including "T") from a file and then go to next
line?
I know how to go to next line but have no idea how to extract string
thank you for answering!
short c;
/* code for extract the string from file */
while ( ( c = fgetc( file ) ) != EOF )
{
if ( c == '\n' )
break;
}
I want to extract a string from a file,
if the file is like this:
1 This is the string 2 3 4
how could I extract the string, starting from the 10th position (i.e. "T")
and extract 35 characters (including "T") from a file and then go to next
line?
I know how to go to next line but have no idea how to extract string
thank you for answering!
short c;
/* code for extract the string from file */
while ( ( c = fgetc( file ) ) != EOF )
{
if ( c == '\n' )
break;
}
Comment