$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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.
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode