hello. In my project the students are added into two levels(1 & 2) each level has it's own linked list so if you choose to add a student in level 1 it will be added to list1, if you choose to add him in level 2 it will be added to list2. how can I make two linked list from the same structure and add to each one separately .
I would appreciate any help .please!!
sam511
-1
Newbie Poster
Recommended Answers
Jump to Posthttp://www.cs.usfca.edu/~wolber/SoftwareDev/C/CStructs.htm
Use a Struct, put both of your linked lists in there. I forget how to make a linked list in C but I think all you need is two pointers, one for each linked list. Beyond that I can't help …
Jump to PostWell two different linked list just means you are holding two different head pointers to those lists what else? You can use the same structure for constructing their nodes unless you want the information to be held in s1 and s2 are different.Post in your code if you still have …
All 5 Replies
BestJewSinceJC
700
Posting Maven
sam511
-1
Newbie Poster
csurfer
422
Posting Pro
sam511
-1
Newbie Poster
s_sridhar
7
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.