Quote:
Originally posted by redhead
What ISO describes the reverse() function ??
|
That would be ISO/IEC IS 14882.
Quote:
|
... and when looking at the code, I can't seem to figure out, why the second argument should be: sentence + strlen (sentence) shouldn't this be something like strlen (sentence)
|
In most STL functions, a range is used instead of a starting point and a distance. So the first argument is the starting point, and the second argument should point right after the last element of the thing you want to reverse. (Remember "sentence" is the address of the first character.)