Storing object of linked list in an array to get adjacency list


I have a set of nodes from a graph structure that I input through text file and represent it in a linked list.My nodes also contain some weights.Every node forms its linked list but now the problem is that I need to store the objects of linked list in an array because I want to form adjacency list from the linked list.

But when I form an array of strings[] like :

string vertices[] = {l.create_list};

It gives an error because for the strings I have to write this in "" but if I do so it just displays the data in "" rather than my linked list.

Can anyone tell me how to form adjacency list using object of linked list.

Last edited on
Topic archived. No new replies allowed.