increment the iterator : string iterator « String « C++






increment the iterator

  
#include <iostream>
#include <string>
#include <cctype>
#include <algorithm>
#include <vector>

using namespace std;

int main()
{
  string strA("This is a test.");

  string::iterator itr;

  itr = find(strA.begin(), strA.end(), 'a');

  ++itr;

  return 0;
}
  
    
  








Related examples in the same category

1.Using an iterator to output a string
2.use iterator
3.string::npos
4.Create an iterator to a string and Use it to cycle through the characters of a string
5.Access the contents of a string using iterators