Re: Initializing an Array
Re: Initializing an Array
- Subject: Re: Initializing an Array
- From: Ondra Cada <email@hidden>
- Date: Wed, 23 Jan 2002 00:06:44 +0100
Jeff, Jeff, Jeff,
>
>>>>> Jeff Galyan (JG) wrote at Tue, 22 Jan 2002 13:30:35 -0700:
JG> >Kinda imprecise. There can be any kind of problem inside, which cause
JG> >any kind of strange bugs.
JG>
JG> Doesn't matter what you do with it here. In my case, I was doing:
JG> char *buffer, *tail;
JG> int aNumber;
JG> [myString getCString:buffer];
and you are telling us it does not matter! I recommend you to re-read
"getCString:" documentation, and I do bet you'll immediately see the very
grave problem.
If not, re-read also this:
On 1/22/02 1:11 PM, "Ondra Cada" <email@hidden> wrote:
>
Actually, if you really can see mysterious changing of variable contents
>
(like "myString" stopping to contain a decent value and lo! it contains nil
>
for no apparent reason) it looks like you access uninitialized pointers or
>
so, and have bad luck enough that they happen to point to your data instead
>
of some nonsense address which would cause SIGBUS.
and check how you declared buffer...
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc