C
CT
Hi
I have a function to test if a pointer* is of type string*. I would like
to use dynamic casting to figure it out. How can i convert a string to a
type to useit in the dynamic_cast<"string"> function. His this possible
in c,c++ ?
this function is used when i deserilaize an object, i only keep the
class name. validation purposes.
the first argument is an interface on which all passed object must
implement.
bool VerifyPointer( baseClass *pData, const char * pszClass )
{
return dynamic_cast<pszClass*>( (baseClass *) pData) ? true : false;
// replace pszclass by macro or whatever to convert a string to
type
}
thanks,
I have a function to test if a pointer* is of type string*. I would like
to use dynamic casting to figure it out. How can i convert a string to a
type to useit in the dynamic_cast<"string"> function. His this possible
in c,c++ ?
this function is used when i deserilaize an object, i only keep the
class name. validation purposes.
the first argument is an interface on which all passed object must
implement.
bool VerifyPointer( baseClass *pData, const char * pszClass )
{
return dynamic_cast<pszClass*>( (baseClass *) pData) ? true : false;
// replace pszclass by macro or whatever to convert a string to
type
}
thanks,