shorten()

Data / Array Functions

Description

Decreases a std::vector by one element. Removes the last element.

Syntax

std::vector<T> shorten(std::vector<T> arr)

Parameters

NameTypeDescription
arrstd::vectorthe vector to shorten

Returns

std::vector

Related