vector_size#

View page source

Size of a Vector#

Syntax#

n = v.size ()

v#

The object v has one of the following prototypes:

      const vec_bool& v
      const vec_int& v
      const vec_double& v
      const vec_a_double& v

n#

The result has c++ prototype

      size_t n

i.e., it is a positive integer. Its value is the number of elements in the vector v .

Example#

c++, python.