Can I use an std::vector as a facade for a pre-allocated (raw) array?
I have acquired a memory location from DirectX where my vertex information is stored. An extremely convenient way to deal with vertex information is to use a std::vector<> of a struct containing vertex info. Given that I have a pointer to a large buffer, could I use a std::vector to manage the elements in the buffer? Constructing a std::vector regularly causes it to have its own address, which isn't really what I want. Could I use operator placement new somehow? Yousf Yes you can. Use custom allocator . In this allocator return address of your DirectX memory. Here is a complete examlpe based