delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/13/03:32:59

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: C++ front end bug
Date: 13 May 1997 04:30:59 GMT
Organization: The National Capital FreeNet
Message-ID: <5l8qq3$gdd@freenet-news.carleton.ca>
References: <Pine DOT D-G DOT 3 DOT 91 DOT 970512113147 DOT 24572A-100000 AT dg1>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet3.carleton.ca
Lines: 21
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


This may be due to how C++ handles comparisons of pointers. If they don't
point to the same thing, they aren't the same, in the C++ viewpoint.

Given

int aa[]={3,4,5}

aa is a pointer to int, type int *.
&aa is a pointer to a pointer to ints type int ** or maybe to an array,
int (*)[3], if the array is static.

Why this difference would be preserved when it is cast to void *, I don't
know.

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


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