05-31-05 12:48 PM
Niraj,
> tParserSo.CreateObject((void *)tPrs)
> bool SoLoader::CreateObject(void* & objectPtr){
I don't think this does what you think it does. I think that the cast
creates a temporary of type void*, and that is passed to CreateObject.
The temporary is assigned to and then discarded. But I could be wrong,
and I would have expected a warning if that were the case.
I repeat my original suggestion: get rid of the cast. E.g.
void* p;
tParserSo.CreateObject(p);
cout << p << endl;
--Phil.
p.s. comp.lang.c++ might be a better place to ask.
[ Post a follow-up to this message ]
|