R
Raider
Why it's impossible for compiler to implicitly cast vector<>::iterator
to void*?
I have:
void f(void *, size_t);
....
vector<int> v;
v.reserve(n);
f(v.begin(), n * sizeof(int));
And compiler (VC7.1) tells me that it unable to convert v.begin() to
void*. What's the easiest way to do it? &(*v.begin())?
to void*?
I have:
void f(void *, size_t);
....
vector<int> v;
v.reserve(n);
f(v.begin(), n * sizeof(int));
And compiler (VC7.1) tells me that it unable to convert v.begin() to
void*. What's the easiest way to do it? &(*v.begin())?