View Single Post
Old 07-15-2003, 09:11 AM   #9 (permalink)
Unicorn
Registered User
 
Unicorn's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 11
Unicorn is on a distinguished road
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.)
Unicorn is offline   Reply With Quote