Hi, most languages (and I'm thinking Ruby and Python) have a String class that contains methods that let you search for substrings. The result of these methods is usually the index (the position) of the first character within the string. Using this position + the length of the searched substring you can find the start position of the following 3 characters.
the string "supercalifragilisticexpialidocious"
is just a list or characters in an array
Code:
supercalifragilisticexpialidocious
0123456789012345678901235456789012
111111111122222222222333
so a search for 'frag' using these methods will return 9, the position of 'f'. 'frag' is 4 characters long so add 4 to 9 and you get 13 (the i character).
I'm not sure if C++ has a String class but I'm fairly confident that there will be methods that will find the position of a substring within a longer string; no idea what they are though.
Hope this was a little bit helpful.