In C++ we have value type (int, long, float, ...) and reference type (class, struct, ...).
For value type, Array and Vector hold the actual values;
For reference type, Array and Vector only hold the references to these objects;
So when we put reference type into Array and Vector, we need to make sure those objects will exist long enough (valid during the entire process) to avoid exception/error;
My above statements are correct or not? please correct me if I am wrong.