string::npos : string iterator « String « C++






string::npos

  
 

#include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;

int main() {
  string text = "asdf asdf asdf asdf asdf";

  size_t start = text.find_first_not_of("df");
  
  cout << start;
  cout << string::npos;

  return 0;
}

/* 
04294967295
 */        
    
  








Related examples in the same category

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