in a situation like the one below, how would you go about reversing the string?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include<iostream>
#include <string>
usingnamespace std;
int main () {
string word;
cin>>word;
//reverse word and save it as string revword
cout<<word
}
this isnt by any means the actual code i am using this function for, but it gets the point across of the question im asking. How would you go about reversing an inputted string and reversing it like so?