www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/16/21:40:12

X-Originating-IP: [200.42.6.189]
From: "Norberto Alfredo Bensa" <ceo AT nbensacomputers DOT com>
To: <djgpp AT delorie DOT com>
References: <20010417000741 DOT 35462 DOT qmail AT web13304 DOT mail DOT yahoo DOT com>
Subject: Re: unyielding integer assignment error
Date: Mon, 16 Apr 2001 21:44:43 -0300
Organization: nBens@ Computers
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <OE602jvaZS8nhqsvXql000013b5@hotmail.com>
X-OriginalArrivalTime: 17 Apr 2001 00:45:23.0709 (UTC) FILETIME=[AFDC42D0:01C0C6D7]
Reply-To: djgpp AT delorie DOT com

I'm not a C++ guru but,

>
> void reset() {
>   // guy1.dead == 0 at this point
>   guy1 = guy(1,100,100);
> -- blah --
> }


You're creating a _new_ object don't you?


>
> and in the guy::guy(int n, int xx, int yy) function:
>
> guy::guy(int n, int xx, int yy) {
>   // but dead == 1712 here
>   num = n; x = xx; y = yy; w = 40, h = 51;
> -- blah --
> }
>
> Somewhere between calling the function and executing
> the first line of the function, guy1.dead was changed
> to 1712. HOW IS THIS POSSIBLE? I am quite confused.
> Please tell me what could be happening here.
>

guy1.dead is 0 in the previous object and is "whatever" in the new guy1...


HTH,
Norberto


> -Rafael Frongillo
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/

- Raw text -


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