I need to implement a function which ads elements to a single linked list:
-if the head(first element) of the list doesn't exist(if head is NULL), then the added(inserted) element becomes the head(the the data entered is of string type)
-if the head already exists, insert it after the last element(for example |A|*->|B|*->NULL, after adding element C, the list looks like this: |A|*->|B|*->|C|*->NULL)
-the information member holds string type information(pointer to char to more precise)
CPT 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
CPT 0 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
CPT 0 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
CPT 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured 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.