Kay wrote:
A linked list is storing several names. I want to make a queue if I
input a name that is same as the linked list. How to make each node of a
linked list storing a queue that are different with each other node, do
I need to add one more item in the ListNode OR I only call the queue
insert function to do it ?
Why should we bother helping you?
After all, it appears that you haven't read or
applied any of the information in the replies
to your posts in various newsgroups.
Post your C language code that you are having problems
with. Indicate where the problem is. Also indicate
the actual behavior versus the expected behavior.
I don't see why you need a queue in a node of a list.
Generally, if a name in a list is duplicated, the
quantity variable in the list is incremented. This
saves memory space and time as well.
struct StringType;
struct node
{
struct StringType name;
unsigned int num_duplicates;
};
If you _really_ need queues for each node:
struct Queue;
struct StringType;
struct node
{
struct StringType name;
struct Queue q;
};
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq:
http://www.parashift.com/c++-faq-lite
C Faq:
http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book