Hi! I'm having a bit of trouble with one of my coding projects for school!
I need to 1. allow the user to enter a sentence and then 2. count how many words are in the sentence. I'm honestly lost on how to go about doing that will a string array so any advice is much appreciated! Below is how far I have gotten and now I must use another function to tell me how many words are in the string.
void getmessage(string& sentence, int& count)
{
cout << "Please enter your message: ";
getline(cin, sentence);