Home » C++ Vector crend() function

C++ Vector crend() function

by Online Tutorials Library

C++ Vector crend()

This function is used to point the element preceding the first element in the vector container. Itrefers as reverse end.

Syntax

Consider a vector ‘v’. Syntax would be:

Parameter

It does not contain any parameter.

Return value

It returns the constant reverse iterator pointing to the reverse end in the sequence.

Example 1

Let’s see a simple example.

Example 2

Let’s see a another simple example

Output:

java  

In this example, crend() function access the first element of the vector container.

Next TopicC++ Vector

You may also like