Chris Gordon-Smith
11/3/2008 8:10:00 PM
Chris Gordon-Smith wrote:
> I have recently started using the Boost Graph Library(BGL);
> overall I am finding it excellent and very powerful.
>
> One thing worries me a little. It seems to be standard practice
> when using BGL to create a data structure with a specific size,
> and then pass a pointer (or iterator) to the start of that data
> structure to an algorithm as an argument.
One thing I should have made clear in the original posting: The algorithm
then populates the data structure that the argument points to. My concern
is that if the data structure was created with the wrong size, there will
be trouble.
>
> Is this OK? Isn't it better to dynamically allocate memory for
> containers according to need, or am I missing the point?
>