cout<<myString[0];
for(int i=0;i<(myString.size-1);i++)
{ if(myString[i]==" ")
{
cout<< myString[i+1];
{
}
I didn’t checked if it compiles that way but you schould get the idea of this possible simple solution.
It will only work with strings similar to your example. You should take a look at the Split Method like others already suggested.
4
solved get the first letter of each word in a string using c++ [closed]