链表插入操作~
摘要:
1 #include <iostream> 2 using namespace std; 3 4 5 typedef struct node 6 { 7 int data; 8 struct node* next; 9 }Node;//节点结构体10 11 12 Node* create(int n)//初始化头指针为空~13 {14 Node* head=(Node*)(malloc(sizeof(Node)));15 head->next=NULL;16 head->data=n;17 return head;18 }19 20 voi... 阅读全文
posted @ 2012-05-10 10:33 mydjm 阅读(420) 评论(0) 推荐(0) 编辑