Hi
I need to convert a STL vector to an array so it can be passed to an API functions. Since I've heard that the vector class keeps the data in continues memory, I convert it through the following code below. But I want to be sure this conversion is fully legal, and not only achievable on my current platform/implementation (which is VC++ btw).
Code:vector<int> vec(10); int *array = &vec[0]; // is this ok?