Monday, April 23, 2012

Cast object pointer to char array

unsigned char *check = NULL;
check = (dynamic_cast<unsigned char *>( ns3::NetDevice::GetChannel() ));


This is what i am trying. but the error is:



"error: cannot dynamic_cast 'ns3::NetDevice::GetChannel() const()' (of type 'class ns3::Ptr') to type 'unsigned char*' (target is not pointer or reference to class)"



I also tried:
reinterpret_cast



Buti does'nt work at all. Stuck with it. Please HELP HELP HELP...





No comments:

Post a Comment