Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

string iterator in c++

// string::begin/end
#include <iostream>
#include <string>

int main ()
{
  std::string str ("Test string");
  for ( std::string::iterator it=str.begin(); it!=str.end(); ++it)
    std::cout << *it << endl;
  std::cout << '
';

  return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #string #iterator
ADD COMMENT
Topic
Name
3+3 =