[vtkusers] vtkPoints array

Burlen burlen at apollo.sr.unh.edu
Mon Oct 10 08:53:35 EDT 2005


I think its because you didn't allocate any memory.

like 

vtkPoints **newPts =new vtkPoint *[10];




On Sunday 09 October 2005 07:08 pm, Divya Rathore wrote:
> Dear Users,
>
>     Could anybody suggest as to why is the following code regarding an
> array of pointers-to-vtkPoints giving RUNTIME assertion in 1st line of the
> loop (where vtkPoints::New() is being called)?
>
> vtkPoints **newPts = NULL;
>  for(int i=0; i<10; i++)
>  {
>   newPts[i] = vtkPoints::New();
>   newPts[i]->InsertPoint(i, (double)i, (double)(i+1), (double)(i+2));
>  }
>
> A similar dynamica allocation of vtkActors works perfectly fine!
> (as suggested once by David Cole from Kitware,
> http://public.kitware.com/pipermail/vtkusers/2005-March/078807.html).
>
> warm regards,
> D. Rathore



More information about the vtkusers mailing list