basic_string::reference

 

A type that provides a reference to an element stored in a string.

Syntax

typedef typename allocator_type::reference reference;

Remarks

A type reference can be used to modify the value of an element.

The type is a synonym for allocator_type::reference.

For type string, it is equivalent to chr&.

Example

See the example for at for an example of how to declare and use reference.

Requirements

Header: <string>

Namespace: std

See Also

basic_string Class