
25 Mar
2009
25 Mar
'09
12:47 p.m.
On Wed, Mar 25, 2009 at 11:04 AM, tom tan
I need some dynamically allocated space that can later be casted to C pointers, so that it can be passed to a Win32 API function that accepts C pointers only. vectors are dynamic, but they don't cast to C arrays naturally. In fact, I am wrapping that API in C++. is there a better way?
The first paragraph of the C++ standard which describes vector class guarantees for verctor<T> (not vector<bool>) to provide the pointer to a continuous block of Ts by using: &vec[0]. vector<bool> is specialization which stores bool values bitwise. Greetings, Ovanes