|
![](/i/fill.gif) |
cadman wrote:
> This is probably more a general C++ question, but I'm working on a POV
> project, so I know you'll be glad to help. How do I assign some typed
> pointer X to an element of a void pointer array?
Are you sure that there's no better way? Something like
"Pointer to base class" or even better an auto_pointer to a base class.
If you put these auto_pointers into the standard container "vector",
deallocation could be handled cleanly by the destructor.
Of course, it depends heavily on your application, whether my suggestions
make sense, but that's why they are suggestions. (Personally, I try to
avoid pure pointers and arrays whenever it's possible.)
Best regards
Thomas
Post a reply to this message
|
![](/i/fill.gif) |