vector/vector/Vector.cpp
// insert value at index, shift everything after
insert value at index, shift everything after
insert value at index shift everything after
void Vector::insert(int index, int value) {
    if (this->isFull()) {
        this->resize(this->arrayCapacity * 2);
    }
    this->arraySize++;
    int i = this->size();
    while (i > index) {
        *(this->pointer + i) = *(this->pointer + i - 1);
        i--;
    }
    *(this->pointer + index) = value;
}
void Vector :: insert ( int index , int value ) { if ( this -> isFull ( ) ) { this -> resize ( this -> arrayCapacity * 2 ) ; } this -> arraySize ++ ; int i = this -> size ( ) ; while ( i > index ) { * ( this -> pointer + i ) = * ( this -> pointer + i - 1 ) ; i -- ; } * ( this -> pointer + index ) = value ; }
insert value at index, shift everything after
insert value at index shift everything after
// increment size