In my previous pointer post, I have a user input:and I converted this string to:Hello to the worldusing this code:olleH ot eht dlrow
Code:istringstream break_apart(input); input = ""; while (break_apart >> word) { front = &word.at(0); rear = &word.at(word.size() - 1); while (front <= rear) { swap (*front, *rear); front++; rear--; } input += word + " ";
Using this sort of method of pointers, how would I change this code to have my pointers point to an ENTIRE word, not just a character like I have above? Thank you very much for all of the help in advance!!



LinkBack URL
About LinkBacks


