hi Louis,<br>
<br>
as you can see on the VTK manual<br>
<br>
&quot;...vtkDataArray is an abstract superclass for data array objects...&quot;<br>
<br>
and obviously you cannot instantiate an abstract class.<br>
<br>
What you probably need is an array of ints, chars, floats or whatever,<br>
so you create a vtkIntArray, vtkCharArray and vtkFloatArray respectively.<br>
<br>
The reason that most filters use or return vtkDataArray is polymorphism.<br>
<br>
HTH<br>
best regards,<br>
yianis nikolaou<br><br><div><span class="gmail_quote">On 8/3/05, <b class="gmail_sendername">Louis Desjardins</b> &lt;<a href="mailto:lost_bits1110@hotmail.com">lost_bits1110@hotmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi experts,<br><br>So I declare an object of type vtkDataArray, like so<br><br>In my header file I have:<br>vtkDataArray *a1;<br>vtkDataArray *a2;<br><br>and then in the constructor of this class I have:<br>a1 = vtkDataArray::New();
<br>a2 = vtkDataArray::New();<br><br>however I get an error pointing to these 2 lines of code which goes:<br><br>mycode.cpp: In constructor<br>`mycode::mycode()': mycode.cpp:45: error: invalid conversion from<br>`vtkObject*' to`vtkDataArray*' mycode:46: error: invalid conversion from
<br>`vtkObject*' to `vtkDataArray*'<br><br>which seems very very bizarre since I've include &quot;vtkDataArray.h&quot;..?<br>i realize this is a very basic question but if someonoe thinks they have any<br>idea waht might be goign wrong, it would be very appreciated
<br><br>thank you!<br>-LD<br><br><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>