Offset a void pointer

CAVEY GERARD <[email protected]> Tue, 12 Oct 2004 14:17:14 +0200
Newsgroups gmane.games.devel.general
Message-ID <71A291D8E360AF4EA6FFFAF9CAD136CA0146FCD9@FR-MAILBOX2.fr.sgam.socgen>
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. 

*************************************************************************





-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557