[vtkusers] initializing an array of vtkObject's

soheilghafurian soheilghafurian at yahoo.com
Thu Jun 23 15:43:43 EDT 2011


Hi

If I want to initialize a vtkObject pointer I use this:

vtkObject *obj = vtkObject::New();

My question is: how should I initialize a pointer to an array of (say i)
vtkObjects? should I use a for loop like this or is there a better way?

vtkObject *obj;
for(j=0; j<i; j++) obj+1 = vtkObject::New();

(I don't think this a good idea!)

--
View this message in context: http://vtk.1045678.n5.nabble.com/initializing-an-array-of-vtkObject-s-tp4518812p4518812.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list