سلام میخوام تابعی بسازم که گره ای که از ورودی اطلاعاتشوگرفته حذف کنه
//linked list inserting a node in the begginging; #include <iostream> using namespace std; struct node { char esm[30]; node* next; }; void print(node* head) { for (; head; head = head->next) { cout << head->esm << endl; } } node* ezafekardan_niro(node* head) { node* niro = new node; niro->next = NULL; cout << "esm"<<endl; cin >> niro->esm; niro->next = head; head = niro; return head; } node *hazf_niro(node *head) int main() { node* head = NULL; unsigned short tedad_karkonan = 0; cin >> tedad_karkonan; cout << endl; for (unsigned short i = 0; i < tedad_karkonan; i++) { head = ezafekardan_niro(head); cout << endl; } cout << "LIST afrad: " << endl; cout << endl; print(head); return 0; }