Erstellt von Ariel Sanchez
vor etwa 8 Jahre
|
||
Frage | Antworten |
**VECTOR**.begin() | return an iterator to the beginning of vector list |
**VECTOR**.end() | return an iterator to the end of vector list |
std::vector<void>::iterator sample = **VECTOR**.begin() | create iterator variable and set value for vector list position |
**VECTOR**[i] | Access Element at (i) the unsafe method |
**VECTOR**.at(i) | Access Element of Vector with bounds checking |
**VECTOR**.front() | access first element of vector list |
**VECTOR**.back() | access last item of list |
**VECTOR**.data() | access data **incomplete definition** |
**VECTOR**.assign() (elements, value) (adjVectorPosi1,adjVectorPos2) *iterators | lets you assign without pushback as if when first declaring the vector |
**VECTOR**.push_back() | adds element to end of vector construct temp obj(copy) then moved to end of vector |
**VECTOR**.pop_back() | deletes element at the end of vector list |
**VECTOR**.insert() (**VECTOR**.begin()) (**VECTOR**.begin(), pos1, pos2) | insert element before position defined with optional param. overloading copy between to positions in different vector |
**VECTOR**.erase() (nthElement) (nth, mthElement) | delete an item from vector at specified or range of nth -> m'th Elements |
**VECTOR**.swap(**VECTOR2**) | swap entire vector contents |
**VECTOR**.clear() | resets to an empty vector |
**VECTOR**.emplace(iterator, value) | forward the value and construct in place no copies no moves |
**VECTOR**.emplace_back() | forward and construct in place at end of vector no copy or moving |
**VECTOR**.size() | returns integer with number of elements |
**VECTOR**.max_size() | returns integer with max memory allocation possible *not max element size |
vector<class || varTYPE> **VECTOR** () (**VECTOR2**) (#, value) (iteraStart,iteraEnd) {1,2,3,4} | vector declaration with parameter overload syntax |
**VECTOR**.resize(intValue) | size the container manually |
**VECTOR**.capacity() | returns max amount of potential element storage without resizing |
**VECTOR**.empty() | bool function checking for empty vector |
Möchten Sie mit GoConqr kostenlos Ihre eigenen Karteikarten erstellen? Mehr erfahren.