Microsoft
Software
Hardware
Network
Question : Can pointers be right shifted and have bitwise AND performed on them?
I don't think following experssions are allowed:
some_pointer >> 8
some_pointer & 0x00FF
Please confirm that pointers cannot be right shifted and bitwise ANded.
Answer : Can pointers be right shifted and have bitwise AND performed on them?
Hi naseeam,
I don't know why you'd want to shift a pointer, but you can if you recast it to an integer type.
void *ptr
ptr = some_value ();
ptr = (void*) (((int)ptr) >> 8);
Kent
Random Solutions
Mac CSS Issue
Extremely slow performance on Web Application
Excel VBA
Custom drupal searchbox
Problems Installing PyQt on OS X 10.6.3
Help! Terminal Server printing
sendAndLoad onHTTPStatus issue
how to install certificate in SBS 2008
How to create a self signed certificate on windows XP
Outlook 2007 Out of Office error, but only for ONE user