user-0 提问: 来个大佬帮忙

回复:
user: user-1
content: C和C++完整教程:https://blog.csdn.net/it_xiangqiang/category_10581430.html C和C++算法完整教程:https://blog.csdn.net/it_xiangqiang/category_10768339.html

user: user-2
content: #include <iostream> //#include "Linklist.h"  #include <iostream> #include <stdio.h>  using namespace std;  #define OK 1 #define ERROR 0 #define TRUE 1 #define FALSE 0  #ifndef EOF #define EOF -1 #endif  #define MAXSiZE 100  typedef int Elemtype; typedef int Status;  //结点 typedef struct Lnode {     Elemtype date;     struct Lnode* next; }Lnode, * Link;   //控制结构 typedef struct link {     Link head, tail;     int len;     int isnotInit; }link;   //初始化 Status Init_Linklist(link& L) {     L.head = L.tail = new Lnode[1];     if (!L.head) { return ERROR; }     //头结点数据域不存数据     L.head->next = NULL;     L.len = 0;     L.isnotInit = 1;      return OK; }  //插入 Status Insert_Linklist(link& L, int i, Elemtype e) {     int j;     Link p, q;     q = p = L.head;     if (L.isnotInit != 1) { return ERROR; }     if (i<1 || i>L.len + 1) { return ERROR; }     if (i != L.len + 1)     {         for (j = 1; j < i; j++) { p = p->next; }//for(j=0;j<i-1;j++),第i-1个结点         q = new Lnode[1];         q->date = e;         q->next = p->next;         p->next = q;         L.tail = q; //Update tail     }     if (i == L.len + 1) {         q = new Lnode[1];         q->date = e;         q->next = L.tail->next;         L.tail->next = q;         L.tail = q;     }//插入在链尾     L.len++;      return OK; }  //删除 Status Delete_Linklist(link& L, int i, Elemtype& e) {     int j;     Link p, q;     p = L.head;     if (L.isnotInit != 1) { return ERROR; }     //if (i < 1 || i < L.len) { return ERROR; }     if (i < 1 || i > L.len) { return ERROR; }      for (j = 1; j < i; j++)         p = p->next;     q = p->next;     e = q->date;     p->next = q->next;     free(q);     /*     if (i != L.len)     {         for (j = 1; j < i; j++) { p = p->next; }         q = p->next;         e = q->date;//保存结点数据         p->next = q->next;         delete[] q;     }     if (i == L.len) {         L.tail = p;     }     */     L.len--;     return OK; }  //按值查找 #if(1) int Locate_Linklist(link L, Elemtype e) {     int i = 1;     if (L.isnotInit != 1) { return ERROR; }     Lnode* p = L.head->next;//第一个结点     while (p != NULL && p->date != e)     {         p = p->next;         i++;     }     //if (p->date == e){return i;}     if (p && p->date == e){return i;}     else     {         cout << "The key is not fine!" << endl;         return -1;//NULL;     }      return -1; } #endif  #if(0) Lnode* Locate_Linklist(link L, Elemtype key) {     Lnode* p = L.head->next;     while (p != NULL && p->date == key) { p = p->next; }     if (p->date == key) { return p; }     else     {         cout << "The key is not fine" << endl;         return NULL;     } } #endif  Status Get_Linklist(link& L, int a, Elemtype& key) {     if (L.isnotInit != 1) { return ERROR; }      Lnode* p = L.head->next;     while (p != NULL && p->date == a) { p = p->next; }     //if (p->date == key) { key = a; }     if (p && p->date == a) { key = a; return OK;}     else     {         cout << "The key is not fine" << endl;         return -1;//NULL;     }      return -1; }  //位置查找 Status Seek_Linklist(link L, int i, Elemtype e) {     if (L.isnotInit != 1) { return ERROR; }     Lnode* p = L.head->next;     //for (int j = 0; j < i - 1; j++) {p = p->next;}     for (int j = 0; j < i - 1 && p; j++) {p = p->next;}     if (!p)         return ERROR;      e = p->date;     return e; }  //位置改值 Status Change_Linklist(link& L, int i, Elemtype& e) {     int j;     if (L.isnotInit != 1) { return ERROR; }     Lnode* p = L.head;     if (i<1 || i>L.len) { return ERROR; }     for (j = 0; j < i - 1; j++) { p = p->next; }     p->date = e;     return OK; }  void Traver_Linklist(link L) {     Lnode* p;     if (!L.head)         return;      p = L.head->next;     while (p)     {         cout << p->date << "\t";         p = p->next;     }     cout<<endl; }  int main() {     int l;     link L;     Elemtype e;     //cout << Init_Linklist(L) << endl;     Init_Linklist(L);      for (int i = 0; i < 10; i++)     {         cin >> e;         Insert_Linklist(L, 1, e);     }     Traver_Linklist(L);     cout << endl;      int n1;     cout << "删除第几个位置:" << " ";     cin >> n1;     Delete_Linklist(L, n1, e);     Traver_Linklist(L);     cout << endl;      int n2;     cin >> e;     n2 = Locate_Linklist(L, e);     Traver_Linklist(L);     cout <<n2<< endl;      int n3;     cin>>n3;     Get_Linklist(L, n3, e);     Traver_Linklist(L);     cout <<e<< endl;      int n4, a;     cin >> e;     a = Seek_Linklist(L, n4, e);     Traver_Linklist(L);     cout << endl;      int n5;     cin >> e>>n5;     Change_Linklist(L, n5, e);     Traver_Linklist(L);     cout << endl;      return 0; } 供参考～

user: user-3
content: 改什么呢？要改成什么样子？