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
GridView control scroll bars are not visible on page reload
Crystal cross-tab page numbering
Server Error in '/Reports' Application in SQL Server Reporting Services
AJAX Refresh on Submit of Pop Up Window
Event ID 12293 Security -SPP Publishing key management service Error#0x8007232D
Audit Failure on Windows 2008
SQL Stored Procedure pass in a list
javax.servlet.jsp.JspExcep
tion: Cannot retrieve definition for form bean null on action
Exchange 2003 Email Delays
Microsoft Information Store stalling issues