• 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
init char buffer to null
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

init char buffer to null


  • Subject: init char buffer to null
  • From: Sandro Noel <email@hidden>
  • Date: Tue, 12 Dec 2006 22:37:21 -0500

hi, :)

char *buffer;
buffer = malloc(delimiterLocation);
[input getBytes:buffer range:NSMakeRange(index, delimiterLocation)];
// do something
free(buffer);

ok this is simple, my problem lies with buffer initialisation,
i'm not that used to "C" and i was wondering if
Objective-c or Carbon had a specefic function to do such thing...
like a fill function...or something...

the problem is funny, is i read from the file an integer let's say 10 and at position 3
I had 5 because of old memory, i end up with the number 105 :)


anyways, I know it's a dumb question, and i did try and find in the docs
but i dont know what i am looking for so, i get a lot of nothing.

thank you for helping...

Sandro Noel.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: init char buffer to null
      • From: Chris Suter <email@hidden>
  • Prev by Date: Re: store management for Document Based Core Data application
  • Next by Date: Re: init char buffer to null
  • Previous by thread: Re: NSWorkspaceDidTerminateApplicationNotification not being posted
  • Next by thread: Re: init char buffer to null
  • Index(es):
    • Date
    • Thread