Re: Writing a linked list
Re: Writing a linked list
- Subject: Re: Writing a linked list
- From: email@hidden
- Date: Thu, 20 Mar 2003 21:31:54 -0800 (PST)
dunno if this would work for your obj-c list structures:
@interface ListNode
{
@private
id data;
ListNode* next
}
although I don't know why you can't do the following;
struct SListNode {
int data
struct SListNode *next
};
@interface ListNode
{
@private
struct SListNode node;
}
althought this seems like more work then the obj-c method
Zameer
On Thu, 20 Mar 2003 21:28:34 -0800 (PST), Britt Green wrote:
>
>
I'm trying to convert my C++ Linked List class into Obj C, to better
>
learn the latter. However I'm having a hard time finding assistance on
>
doing this. I was wondering if anyone could point me to any examples of
>
this, or at least tell me if I can embed a C-style struct as a private
>
data member in a class?
>
>
Thanks!
>
>
Britt
>
>
PS: I am aware of the NSArray class but I just want to write my own
>
linked list as an academic exercise.
>
>
=====
>
"The ocean, she is strange and wonderous, filled with animals that disturb even
>
a Frenchman."
>
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
>
<a
href="
http://mail.canada.com/jump/http://platinum.yahoo.com">
http://platinum.yahoo.com</a>
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives: <a
href="
http://mail.canada.com/jump/http://www.lists.apple.com/mailman/listinfo/cocoa-dev">
http://www.lists.apple.com/mailman/listinfo/cocoa-dev</a>
>
Do not post admin requests to the list. They will be ignored.
__________________________________________________________
Get your FREE personalized e-mail at
http://www.canada.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.