Retrieving a particular line from list<string>

Hi, I have read a .txt file into a list<string> container and now I am trying to pull out individual lines that meet certain criteria. For example the text file I am reading from is layed out like a table:Name age sex
Peter 25 m
Paul 32 f
Jenny 19 f

I want to retrieve a line by searching for the name e.g passing a "Peter" argument will return "Peter 25 m" and afterwards I want to split this line up into individual elements "Peter", 25 and 'm'
How would I go about this?
Here is the code I have so far.

The C function strstr() tells you if a string exists within another string, e.g. strstr("Peter","Peter 25 m") would return TRUE. I'm not sure if std::string has anything like that; if not then you would need to call c_str() for the parameters to strstr().

The C function strstr() tells you if a string exists within another string, e.g. strstr("Peter","Peter 25 m") would return TRUE. I'm not sure if std::string has anything like that; if not then you would need to call c_str() for the parameters to strstr().

That works, however the arguments are the reverse of what you put e.g strstr("Peter 25 m", "Peter") instead of strstr("Peter", "Peter 25 m") and I did have to call c_str() like you said.
Thanks