I'm beginner to C++ and I wonder how to do this. I want to write a code which take in a text line. E.g. "Hello stackoverflow is a really good site"
From the output I want only to print out the first three words and skip the rest.
Output I want: "Hello stackoverflow is"
If it was Java I would've used the string split(). As for C++ I don't really know. Is their any similar or what is the approach for C++?