std::vector provides  operator i.e.
element_reference operator (size_type n);
It returns the reference of element in vector at index n.
std::vector provides an another member function at() i.e.
reference at(size_type n);
It returns the reference of element at index n in vector. If index n is out of range i.e. greater then size of vector then it will throw out_of_range exception.