• 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
Adding Structure in NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding Structure in NSArray


  • Subject: Adding Structure in NSArray
  • From: omer riaz <email@hidden>
  • Date: Tue, 15 Aug 2006 18:10:09 +0500

Hi

I have a small problem. I wanted convert dynamic linklist, which is composed of struct, into NSArray. Is there any method, I can take this struct as a unit of NSArray. I have tried the following code but it is not working. It gives me error at id songs

typedef struct track_item
{
  // Some thing in here
}track_item_t;

track_item_t* head;

id songs = [[NSMutableArray alloc] initWithObjects:(track_item_t*) head];

// some code to fill have an other list element.

after this try to fill this array using following code

[songs addObject:(track_item_t*) head];

Regards
Omer Riaz
--
This message has been scanned for viruses and
dangerous content by Streaming Networks, and is
believed to be clean.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Adding Structure in NSArray
      • From: Fredrik Olsson <email@hidden>
    • Re: Adding Structure in NSArray
      • From: Chris Hanson <email@hidden>
  • Prev by Date: NSTableView
  • Next by Date: Re: [self init] vs. [super init] in initWithCoder
  • Previous by thread: Re: NSTableView
  • Next by thread: Re: Adding Structure in NSArray
  • Index(es):
    • Date
    • Thread