D
Dave Rahardja
Is there a way to easily convert between a std::vector and a C-style array?
In the Microsoft C++/Dinkumware library, std::vector::begin() returns a
pointer to the data type and not some custom iterator for all types except
bool. This pointer can then be used as the base pointer to the array.
I don't think this is standard behavior, and I believe the cast is strictly
incorrect according to the STL standard. Am I right, or can I expect certain
types such as std::vector<int> to be cast-able to an array?
-dr
In the Microsoft C++/Dinkumware library, std::vector::begin() returns a
pointer to the data type and not some custom iterator for all types except
bool. This pointer can then be used as the base pointer to the array.
I don't think this is standard behavior, and I believe the cast is strictly
incorrect according to the STL standard. Am I right, or can I expect certain
types such as std::vector<int> to be cast-able to an array?
-dr