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
How to get lightbox to show over Flash banner?
SBS 2003 to 2008 Migration Preparation Tool Error
SQL 2008 Installation in SBS 2008 Premium Env
blueberries- only in NJ?
exceed problem
Server 2008 R2 print server vs. XP clients
Virtual Machine Activation
VB Script and QTP
How to enable error reporting in event viewer for IE 8
No translation group found