[vtkusers] vtkSmartPointer usage question

F frinxor at gmail.com
Fri Nov 6 20:24:31 EST 2009


Thanks Jeff,

that fixed it! I had double checked on that at first, but for some reason
thought vtkMultiBlockPLOT3DReader was the equivalent of
vtkMultiBlockDataSet...

On Fri, Nov 6, 2009 at 6:20 PM, Jeff Baumes <jeff.baumes at kitware.com> wrote:

>
>
> On Fri, Nov 6, 2009 at 6:17 PM, F <frinxor at gmail.com> wrote:
>
>> I've been following along with this conversation and following the example
>> on the wiki, I tried to do this:
>>
>>     vtkSmartPointer<vtkMultiBlockPLOT3DReader> m_Reader2;
>>     vtkSmartPointer<vtkMultiBlockDataSet> dataset =
>> m_Reader2->GetOutput();
>>
>> which gave me an error
>>  error C2664: 'vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase *)'
>> : cannot convert parameter 1 from 'vtkMultiBlockDataSet *' to 'vtkObjectBase
>> *'
>>
>> I can't seem to figure out why this is the case?
>>
>>
>>
> These seemingly cryptic errors with smart pointers normally mean that you
> forgot an include:
>
> #include "vtkMultiBlockDataSet.h"
>
> Jeff
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091106/d26454c8/attachment.htm>


More information about the vtkusers mailing list