As part of a project I'm working on, I need to develop a program that can take in a sentence and convert it somehow (I'm choosing to convert into Pig Latin). At first I thought this was going to be a piece of cake, until I realized that after
#include <iostream>
using namespace std;
int main(){
string sentence;
cout << "Please enter the phrase you want to be translated: ";
getline(cin, sentence);
return 0;}
I have no real good idea of how to iterate through to the string so I can get it to do what I want. I need to separate each individual word (so copy every letter up to the first space), check whether the first letter of that word is a vowel or not (if vowel, do nothing), and if it's not a vowel move the first letter to the end of the word and add the letters 'ay', and then display it. An example would be
this is a phrase
histay is a hrasetay
Any help on how to accomplish such an easy sounding yet somehow ridiculously hard feat would be appreciated.