[vtkusers] vtkCell and New function

Frederic Huguet fxh39668 at gsk.com
Mon May 6 09:31:03 EDT 2002


hello,

I've tried to create an isolate vtkCell object with the following code :

vtkCell* Cell = vtkCell :: New();

but I get the following error message :

d:\sources\3dvoxel\cut.cpp(832) : error C2440: 'initializing' : cannot
convert from 'class vtkObject *' to 'class vtkCell *'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast

I thought New was the only mean to create any kind of vtk Object.
How could I solve this problem without using a static cast ?

Thanks.





More information about the vtkusers mailing list