www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/18/11:35:12

From: bartosz AT hostr DOT bielbit DOT bielsko DOT pl
Date: Mon, 18 Nov 1996 18:29:03 +0100 (MET)
To: Elliott Oti <e DOT oti AT stud DOT warande DOT ruu DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: Q: Typedef riddle
In-Reply-To: <328DD331.26E4@stud.warande.ruu.nl>
Message-ID: <Pine.LNX.3.91.961118182603.3316D-100000@hostr.bielbit.bielsko.pl>
MIME-Version: 1.0


On Sat, 16 Nov 1996, Elliott Oti wrote:

[snip]
>      10 <rubbish> <rubbish>
>      It's also 10 10 10
> 
> instead of  
>   
>      10 10 10
>      It's also 10 10 10 
> 
> It's not a gcc bug because Borland gives a similar output,
> but -Wall gives absolutely no warnings. So what's wrong?
> 
> TIA,
> Elliott
> 
> void Dump(thing *V)
> {
> printf("\n%i %i %i\n",*V[0],*V[1],*V[2]);

                        ^ ??????

Why are you using * operator. To get value of the 0 element you jaust 
need V[0]. If you use *V[0] you traet V[0] as a pointer.

Regards,

Bartosz
bartosz AT bielbit DOT bielsko DOT pl

- Raw text -


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