[GD-General] Offset a void pointer
Brought to you by:
vexxed72
From: CAVEY G. <GER...@sg...> - 2004-10-12 12:16:07
|
Hi I have little question It seems impossible to me to offset a void pointer with the += operator can someone explain me why ? I don t really understand the compiler here ... the left casting should give him the memory unit size , right?Is left casting forbidden? void *BufferPtr; unnsigned int stridde=5; //doesnt compile ! (char*)BufferPtr+=stride; //will compile BufferPtr=(char*)BufferPtr+stride; Thanks GC. ************************************************************************* Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. SG Asset Management et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Decouvrez l'offre et les services de SG Asset Management sur le site www.sgam.fr ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SG Asset Management nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. ************************************************************************* |