分类：电脑/网络-互联网
问题：vC++6.0做的学生信息管理~ 
回答：#include<tream.h> #include"string.h" #include "process.h" struct Node { int age; char* name; Node* next; }; void AddTohead(Node* node,char* name,int age) { if(!node) return; Node* newnode = new Node; if(name) { int cd = strlen(name)+1; newnode->name = new char [cd]; strcpy(newnode->name,name); } else newnode->name = NULL; newnode->age = age; newnode->next = node->next; node->next = newnode; } void Delete(Node* node) { Node* del; while(node->next) { del = node->next; if(del->next) delete [] del->name; node->next = del->next; delete del; } } void AddToList(Node* node,char* name,int age) { if(!node) return; Node* newnode = new Node; while(node->next) node = node->next; if(name) { int cd = strlen(name)+1; newnode->name = new char [cd]; strcpy(newnode->name,name); } else newnode->name = NULL; newnode->age = age; node->next = newnode; newnode->next = NULL; } void DelSomeBody(Node* node,char* name) { if(!node) return; Node* head = node; if(!name) cout<<"the name please"; else { Node* p = node->next; Node* m = node; while(m) { if(!strcmp(p->name,name)) break; m = m->next; p = p->next; } if(p==NULL) { cout<<"no one"; } else { while(head->next!= p) head = head->next; delete [] p->name; head->next = p->next; delete p; } } } void Change(Node* node,char* name,char* newname,int age) { if(!node) return; Node* head = node; if(!name) cout<<"the name please"; else { Node* p = node->next; Node* m = node; while(m) { if(!strcmp(p->name,name)) break; m = m->next; p = p->next; } if(p==NULL) { cout<<"no one"; } else { int cd = strlen(newname)+1; p->name = new char [cd]; strcpy(p->name,newname); p->age = age; } } } void Find(Node* node,char* findname) { if(!node) return; Node* head = node; Node* m = NULL; m = node->next; if(!m) cout<<"链表为空的 不存在 请选择操作"<<endl; return; do { if (!strcmp(m->name,findname)) break; m = m->next; } while (m); if(m==NULL) { cout<<"nobody"<<endl; } else { cout<<m->name<<""<<m->age<<endl; } } void main() { } main就自己写吧用链表多方便啊为什么不用呢