Making a Array for Vector Locations for a object in C++

I have converted it to answer. You can mark to help people find out solution. Feel free to ask other questions.