
20 Jul
2006
20 Jul
'06
5:30 p.m.
loufoque wrote:
John Maddock wrote :
Scoped_array: Useful for temporary buffers whose size is determined at runtime. Doesn't have a container interface though, and probably mostly used for interfacing with legacy C API's.
Why not use std::vector here ? You get the interfacing with C using &v[0].
True. And thinking about it, I can't actually remember ever using it either, but that was the motivation for providing it if my memory is correct. My only complaint about std::vector is that the &v[0] always feels like a hack to me, even if it is guarenteed to work. John.