fn: std::vector.pop_back

[contents]

Contents

Syntax

The syntax for std::vector.pop_back calls is:

f++:  
name.pop_back()
std::vector.pop_back(name)

n++:  
@name.pop_back()
@std::vector.pop_back(name)

Description

The std::vector.pop_back function takes a single parameter specifying the name of a standard C++ vector variable, it erases the last element. As a member function it takes zero parameters.

Note: For large scale projects you will find specifying the !mf option to not add member functions during definitions and using std::vector.pop_back is faster than using the pop_back member function.

f++ example

Example of std::vector.pop_back being used with f++:

std::vector<double> v
v.push_back(2.0, 5.3, 3.26)
v.pop_back
std::vector.pop_back(v)
console(v.at(0))

n++ example

Example of std::vector.pop_back being used with n++:

@std::vector<double> v
@v.push_back(2.0, 5.3, 3.26)
@v.pop_back
@std::vector.pop_back(v)
@console(v.at(0))