Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualMartins Mozeiko

Posted 11 April 2013 - 11:17 PM

I don't think that casting from void* to A* will change address. Cating from B* to A* - yes it can, but not from void*.


I think in this case author is allocating memory with new [] and array allocation stores length in first 4 bytes, that's why it returns address with +4 offset.


#1Martins Mozeiko

Posted 11 April 2013 - 11:16 PM

I don't think that casting from void* to A* will change address. Cating from B* to A* - yes it can, but not from void*.


I think in this case author is allocating memory with new [], and array allocation stores length in first 4 bytes, that's why it returns address with +4 offset.


PARTNERS