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
Require 2 CPUs on an Intel Server SC5520HC Motherboard?
laptop display problems
Extract icon from EXE/DLL
Built-In Webcam Stopped Working on Lenovo ThinkPad
Dreamweaver and jQuery
Error event occuring since bringing up new HubCAS sever
How to do manual failover in SQL Cluster
Feildset hide/show in Google Mail, php
BES multiple calendar syncronization
Printing to printer over a WAN Link