[vtkusers] bizarre error

Louis Desjardins lost_bits1110 at hotmail.com
Wed Aug 3 09:59:28 EDT 2005


Hi experts,

So I declare an object of type vtkDataArray, like so

In my header file I have:
vtkDataArray *a1;
vtkDataArray *a2;

and then in the constructor of this class I have:
a1 = vtkDataArray::New();
a2 = vtkDataArray::New();

however I get an error pointing to these 2 lines of code which goes:

mycode.cpp: In constructor
`mycode::mycode()': mycode.cpp:45: error: invalid conversion from 
`vtkObject*' to`vtkDataArray*' mycode:46: error: invalid conversion from 
`vtkObject*' to `vtkDataArray*'

which seems very very bizarre since I've include "vtkDataArray.h"..?
i realize this is a very basic question but if someonoe thinks they have any 
idea waht might be goign wrong, it would be very appreciated

thank you!
-LD





More information about the vtkusers mailing list