Multiple Array Linked List

C

chellappa

hi
i create a c program ,which waas doing operation of linked
list.......in single linked list it is working properly, but i want
multiple linked list of same member... i am using array of memeber.. it
give error? i tried all ways and also search in neet and google
group.........i wasnt find it.........so if any other methods is know
tell ...

ex i have one struct ,i want crearte multiple object for struct
........each object is different linked list

Thank u
by
CNS
 
U

Ulrich Eckhardt

chellappa said:
i create a c program ,which waas doing operation of linked
list.......in single linked list it is working properly, but i want
multiple linked list of same member... i am using array of memeber.. it
give error? i tried all ways and also search in neet and google
group.........i wasnt find it.........so if any other methods is know
tell ...

You can not generally put the same object into two different linked lists,
but you can put a pointer to an object into different lists.

If that was not what you wanted, I don't have a clue - maybe give an
example of what you want and use complete sentences.

Uli
 
E

Emmanuel Delahaye

chellappa wrote on 06/08/05 :

[Your '.' key is dirty and you capslock key is broken ... Time to get a
new keyboard ?]
I create a c program, which was doing operation of linked
list. in single linked list it is working properly, but i want
multiple linked list of same member... I am using array of member... it
give error?

What error ? Where is your code ? Are we supposed to be psychic ?

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"Mal nommer les choses c'est ajouter du malheur au
monde." -- Albert Camus.
 
E

Eric Sosman

Ulrich said:
You can not generally put the same object into two different linked lists,
but you can put a pointer to an object into different lists.

It's entirely possible for an object to be a member
of several linked lists, even without using a separate
pointer. Here's a struct one might use in a two-way
linked representation of a sparse matrix:

struct cell {
double value;
int row, col;
struct cell *right;
struct cell *down;
};
If that was not what you wanted, I don't have a clue - maybe give an
example of what you want and use complete sentences.

Seconded, heartily.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,915
Members
47,456
Latest member
JavierWalp

Latest Threads

Top