B
Bob Altman
Hi all,
In unmanaged C++, I need to allocate an "array" of int values, put values
into the array, then call a function and pass it the address and length of
the array. The length of the array is only known at run-time, so I assume
that my best course of action is to use a std::vector object for the
"array". My question is, am I guaranteed that the vector stores its data in
contiguous memory, so that I can use vector.begin() as a pointer to the
memory containing my contiguous array of data?
In unmanaged C++, I need to allocate an "array" of int values, put values
into the array, then call a function and pass it the address and length of
the array. The length of the array is only known at run-time, so I assume
that my best course of action is to use a std::vector object for the
"array". My question is, am I guaranteed that the vector stores its data in
contiguous memory, so that I can use vector.begin() as a pointer to the
memory containing my contiguous array of data?