• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Initializing an Array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Initializing an Array (From: Jeff Galyan <email@hidden>)

  • Prev by Date: Page Setup..
  • Next by Date: Re: Initializing an Array
  • Previous by thread: Re: Initializing an Array
  • Next by thread: Re: Initializing an Array
  • Index(es):
    • Date
    • Thread