链表的结点结构与操作函数

      计算机与编程 2007-12-5 14:52:00

//一个链表的结点结构

struct Node
{
int data ;
Node *next ;
};
Node* head = NULL;

//写出添加链表节点的操作函数

bool AddNode(int data)
{
Node* n= new Node;
n->data= data;
n->next= head;
head= n;
}

标签集:TAGS:
回复Comments() 点击Count()
喜欢就顶一下

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}