basic_string::back

Returns a reference to the last element in the string.

const_reference back() const;
reference back();

Return Value

A reference to the last element of the string, which must be non-empty.

Requirements

Header: <string>

Namespace: std

See Also

Reference

basic_string Class

<string>

Other Resources

basic_string Members

<string> Members