C++ Vector operator[]() This function is used to access a specified element. Syntax Consider a vector ‘v’ and position ‘pos’. Syntax would…
emplace()
-
-
C++ Vector capacity() This function determines the current capacity of the vector. Note: Capacity of the vector can be equal or greater…
-
C++ Vector operator=() This function assigns new values to the vector container and replacing old ones. Syntax Consider two vectors ‘v’ and…
-
C++ Vector cbegin() This function is used to point the first element of the vector container. cbegin() vs begin() The cbegin() function…
-
C++ Vector cend() This function is used to point to the past-the-last element (element after the last element) in the vector. cend()…
-
C++ Vector clear() This function removes all the elements from the vector. Syntax Consider a vector v. Syntax would be: v.clear(); Parameter…
-
C++ Vector rbegin() The rbegin() stands for ‘reverse beginning’ and is used to point the last element of the vector. Syntax Consider…
-
C++ Vector crbegin() The crbegin() function stands for reverse beginning. It is used to point the last character of the vector container.…
-
C++ Vector rend() The rend() function stands for ‘reverse end’ and is used to point the element preceding the first element of…
-
C++ Vector crend() This function is used to point the element preceding the first element in the vector container. Itrefers as reverse…