Implementing a simple linked list

Login to reply to this topic.
Mon, 2005-06-06 10:12
Joined: 2005-05-09
Forum posts: 30
Hello

I am trying to add a functionality to an application that I am writing in Symbian C++. I had earlier implemented that functionality in C and it made used of a linked list. A typical node of the linked list looked like this -
struct stream_items
{
     char data[150];
     char id[20];
     struct stream_items* nextitems;
     struct stream_items* previtems;
};

I then dynamically created nodes of this type and made up a doubly linked list. How do I create such a thing here in Symbian C++? I just read Doubly Linked Lists Overview in the SDK help. Is that the way I do it (I felt it was a bit complex) or can I create the link list as I used to be doing in C? Please do help me with a few tips.

Thanks for all the help
Warm Regards
Johnsy

Mon, 2005-06-06 22:50
Guest (not verified)
Forum posts: 2043
Re: Implementing a simple linked list
You could implement your own linked list just as you would in C, as you'll know there's nothing complicated about them.
Alternatively the arrays in symbian are dynamic so you could use those instead
Tue, 2005-06-07 11:31
Joined: 2004-07-28
Forum posts: 1379
Re: Implementing a simple linked list
Or just use the linked list implmentation already included in Symbian Smiley

didster

Mon, 2005-12-05 12:35
Joined: 2005-10-10
Forum posts: 18
Re: Implementing a simple linked list
Quote from: didster
Or just use the linked list implmentation already included in Symbian Smiley

HI,

I have a Basic Dought that can we implement a binary tree in symbian... i have found single and doubly linked list description. but i have no info regarding the trees... can u help me out in this.....iam using the 7.0s version
Tue, 2005-12-06 09:02
Joined: 2005-08-11
Forum posts: 278
Re: Implementing a simple linked list
Hi ,

about the tree implementation you can try to use the TBtree class.
  • Login to reply to this topic.