I am new to C++ and trying to figure out how to use vector.
More specifically, I want to know when I need to use #include. I
When you see code that uses std::vector, but did not #include , that code is broken. Period.
It may "just so happen" to work on particular compilers/standard library implementations/platforms/planets, depending on which other standard headers "just so happen" to already be including for their own use. This shall not be relied upon.