Re: Files and strings in C
You can use fgets to read a line into a character array. Then youI would string copy the section that I wanted into a second character array. Something like this might work for you:
char* source="1 This is the string 2 3 4";
char destination[26]={0};
strncpy(destination, source+10, 25);
printf("\"%s\"\n", destination);
The output on my system is:
"This is the string "
Re: Files and strings in C
Thank you for your help.But I have another sugestion:If I use the Tokenizer.