Hi All, does anyone know what is meant by creating a circular list in C? I understand this would create a loop but that is the intention at the moment. It is for some work at Uni but I am in a bit of a bind and need a pointer at least. Thanks
a circular list is a linked list where the last element has a pointer to the first element. Code: struct listitem { some data pointer to next element } list l = pointer to element a listitem a = some data, pointer to b listitem b = some data, pointer to c listitem c = some data, pointer to a (my knowledge of C is pretty crappy, but i think this gets the point across)
Yes, yes you do.... (tee hee sorry!) Is it the actual code you are struggling on or the concept of a circular list?
I wondered if anyone would get that. I understand the concept, I was having some problems putting it into practice. I think I have now figured it out. Not well however, though hand in for it was Friday, so I don' have to worry about it much. Thanks for your help guys.