Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

string reverse iterator c++

// string::rbegin/rend
#include <iostream>
#include <string>

int main ()
{
  std::string str ("now step live...");
  for (std::string::reverse_iterator rit=str.rbegin(); rit!=str.rend(); ++rit)
    std::cout << *rit;
  return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #string #reverse #iterator
ADD COMMENT
Topic
Name
6+7 =