plz how i can delete a specific value in linkedlist ..

Recommended Answers

All 2 Replies

Pretty generic question. But to take a shot at your question, you need a way to iterate through your list until you find the node you want to delete, and than reassign your pointers to exclude the node you want to remove from the list. And make sure to free that memory.

plz how i can delete a specific value in linkedlist ..

#include "the_code_that_I_wrote.h"
int main() {
   //... create and populate the list here..
   delete_specific_value(myList, specific_value);
   return 0;
}

In case it's not obvious, the_code_that_I_wrote.h contains the implementation of delete_specific_value() .

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.