basic_string::const_iterator

A type that provides a random-access iterator that can access and read a const element in the string.

typedef implementation-defined const_iterator;

Remarks

A type const_iterator cannot be used to modify the value of a character and is used to iterate through a string in a forward direction.

Example

See the example for begin for an example of how to declare and use const_iterator.

Requirements

Header: <string>

Namespace: std

See Also

Reference

basic_string Class

Other Resources

basic_string Members