0

Hello, i am a newbie.
Now i got a problem about Extracting some specific strings from a txt file.
Here is the txt file like:

121348319B'\t'Herman Gerrand'\t'ED001' 'C'\t'ED002' 'A
ED003' 'B'\t'ED004' 'C
124311431B'\t'Shakes Hand'\t'ED021' 'F'\t'ED003' 'C
ED007' 'A'\t'ED011' 'B
124134131B ....go on

The sequence logic is: student ID'\t'student name'\t'subject code' 'subject grade'\n'

The problem is how can i extract only the name to make a student name list?

I have searched a lot and still cant get help, so i am here.
Thank you for helping.

Using visual studio 2010express

2
Contributors
3
Replies
18
Views
3 Years
Discussion Span
Last Post by tinstaafl
0

Sorry i am stupid. I still can't get anything from that article.
Would you mind please do an example for me?

0
#include <stdio.h>
#include <string.h>

int main()
{
  char s[] = "one, two,, four , five,"; /* mutable! */
  const char* p;

  for (p = strtok( s, "," );  p;  p = strtok( NULL, "," ))
  {
    printf( "\"%s\"\n", p );
  }

  return 0;
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.