delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/25/15:23:57

Message-ID: <3683F450.9B44D42F@gmx.de>
Date: Fri, 25 Dec 1998 21:23:44 +0100
From: Christian Hofrichter <ChristianHofrichter AT gmx DOT de>
X-Mailer: Mozilla 4.5 [de]C-CCK-MCD QXW03201 (Win95; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: void pointer arithmetic causes warning message
Reply-To: djgpp AT delorie DOT com

I have a void pointer and want to increase it by some bytes. Although I
convert it into a char pointer I get a warning, everytime when compiling
my code :
"ANSI C++ forbids cast to non-reference type used as lvalue"

That not so bad, but how can I deactivate or avoid this message ?
What I did is:
(unsigned char*)pointer+=4;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019