Hey guys, I've tried writing code to reverse my sentence, but I keep getting an error in my for loop saying "Expected Expression". Also, should the asterisk go after the "modify" in my code? I'm not sure how pointers are exactly supposed to work and I haven't been given any errors for doing so yet. Thanks in advance, and here is my code!
void f1 (const char* sentence)
{
char sentence2;
sentence = &sentence2;
char* modify = &sentence2;
basic_string <char>::reverse_iterator revSentence;
cout << "The reversed string is:" << endl;
for (revSentence = modify*.rbegin(); revSentence !=modify*.rend(); modify*++)
{
cout << *revSentence;
}
}