[vtkusers] include header file or cast

Paul Tait paul at opes.com.au
Tue Oct 14 00:24:30 EDT 2003


As I'm still learning VTK I find it very disconcerting when I get an error
such as

error C2664: 'SetInput' : cannot convert parameter 1 from 'class
vtkUnstructuredGrid *' to 'class vtkDataSet *'

After checking the help file I find that vtkUnstructuredGrid is derived from
vtkDataSet and as they are both pointers it should compile. After a quick
panic attack thinking I don't know anything about C++ I check the mailing
list.

 I've seen casts used but now I'm forcing myself to do what I think is the
right thing and including

#include <vtkUnstructuredGrid.h>

What do you think

Paul Tait





More information about the vtkusers mailing list