[vtkusers] Destructor and vector
Jérôme Lecoq
jerome.lecoq at espci.fr
Thu Sep 30 10:06:07 EDT 2004
I am currently learning to use this fine tool which is VTK. Besides I am
quite new to C++, so I hope I am not asking a stupid question...
I use vtkPlanesource in my program. It works fine. I managed to create two
plane with a tiff printed on it thanks to vtkTexture.
>From that, I want to display a complete stack of tiffs on multiple planes.
To do that, I think (maybe I am wrong...) I need to create a vector of
vtkPlaneSource whose length is the number of tiff I have. Unfortunately
when I create it :
stack <vtkPlaneSource> Vecplane;
I get the follwing error at compilation:
E2166 Destructor for 'vtkPlaneSource' is not accessible
So I looked at vtKPlaneSource.h and the destructor ~vtkPlaneSource() was
protected.
And if I moved it to Public, the compilation worked like a charm, so it
found the destructor...
So my question is: why is the destructor protected?
Usually, a destructor is public, no?
Jérôme Lecoq
More information about the vtkusers
mailing list