Boost Users :
Subject: Re: [Boost-users] [array] with variable size
From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-11-20 11:10:30
On Thu, Nov 20, 2008 at 8:00 AM, Hicham Mouline <hicham_at_[hidden]> wrote:
> I thought of using a array<double, Nmax> that would be allocated once,
> then perhaps have a wrapper around it so that only N elements of it
> can be accessed.
> This seems to be a usual idiom, are there ready implementations?
What's wrong with std::vector? You could use ::reserve to allocate
memory independently of how much of it is actually being used.
Reverge Studios, Inc.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net