<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello all,<br>
<br>
I would to how if there is a way to create an array of SmartPointer and
if there is one, how to do that.<br>
Actually I'm looking for writing a class in which I'd like to store
some SmartPointer in an array<br>
For example in the header of the class, I have something like :<br>
<br>
<i> typedef GaussianDensityFunction< MeasurementVectorType
> DensityComponantType;<br>
typedef DensityComponantType::Pointer
DensityComponantPointer;</i><br>
<br>
In this class I use an attribute:<br>
<br>
<i> DensityComponantPointer * m_GaussianComponents;</i><br>
<br>
<br>
I would like this attribute to be an array where I could store a set
of N * <i>DensityComponantPointer<br>
</i>I've tried to write something like :<br>
<br>
<i> unsigned int size = m_List->Size();<br>
m_GaussianComponents = new DensityComponantPointer[size];<br>
<br>
for ( unsigned int s = 0; s < size; s++ ) <br>
{ <br>
this->m_GaussianComponents[size] =
DensityComponantType::New();<br>
}<br>
<br>
</i>in my *.txx* file but I get a unhandled execption when debugging
it <br>
Is there a way to resolve it ??<br>
<br>
Bertrand<br>
<br>
</body>
</html>