Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost-users Digest, Vol 1945, Issue 2
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2009-03-25 08:47:31

On Wed, Mar 25, 2009 at 11:04 AM, tom tan <ttan_at_[hidden]> wrote:

> 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.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at