What is a "pattern"?
What is a "pattern"?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
For example, "__" (two underlines), " " (a whitespace), "::" (two double points) are a pattern that the code is supposed to find.
Those patterns determine where a new substring begins.
"he::llo" has two substrings, one being 2 characters long, one being 3 characters long. The pattern "::" divides them.
My current code finds that the input "he::llo" is divided by one "::"-pattern and prints "2", because the :: seperates the whole String into two substrings.
But now I don't want the output to be a number. I want it to print out the last substring, in my example, I want "llo" printed out.