linked list creation
i want to create a link list , which i can by adding the elements at the end,
if size is known.
however, suppose i do not know the size of the list. say, the user can keep on adding the nodes limited by the size of the virtual memory.
How should I create the linked list class ?
any ideas? I am not asking to write the code for me, just function prototypes and the methodology.
As long as you are keeping tracking of the insertion point, the size of the list does not matter (other than the fact that your machine has limited memory).
ok, so you mean, I can add ,say a while loop in the user file which does not test for the size but whether the user wants to add new nodes, i should be ok?
If I understand you correctly, yes. Why were you testing for size?
well, somebody asked me this, so i was not sure is that the way to do or not.