I\'m new to C++ and am curious if this is the preferred way of inserting into a std::vector
std::vector myVector; void setAt(int x
It will work in case you are not trying to access it out of its bounds, i.e. vector size is greater than x.