help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error message of pointer of type `void *' used in arithmetic in g++


From: hacklberry
Subject: Re: Error message of pointer of type `void *' used in arithmetic in g++
Date: Sun, 11 Dec 2005 23:00:45 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920

Crap wrote:
Hi there

there is this little part of my project that has a few lines involving moving a void pointer to and fro by a few bytes, i.e. ptr += (something) or ptr -= (something) where ptr is of type void *

The code compiles fine in gcc and the program works perfect with no memory leaks or seg faults, but this won't compile with g++ at all and it keeps complaining with error messages of :

         pointer of type `void *' used in arithmetic

on those lines with ath void pointer that I have mentioned. Is there some flag in g++ to get rid of this annoying issue? I have gcc/g++ 3.2.2

Thanks


http://www.research.att.com/~bs/bs_faq2.html#void-ptr

cheers,

h


reply via email to

[Prev in Thread] Current Thread [Next in Thread]