| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 542 人关注过本帖
标题:怎么搞MAIN函数?
只看楼主 加入收藏
小真丁丁
Rank: 2
等 级:论坛游民
帖 子:36
专家分:18
注 册:2009-9-20
结帖率:58.33%
收藏
已结贴  问题点数:20 回复次数:3 
怎么搞MAIN函数?
#include"stdafx.h"
#include "iostream.h"
#include"stdlib.h"

typedef int Elementtype;

struct celltype {
 int element;
 celltype * next;
};
typedef celltype * LIST;
typedef celltype * position;


celltype * End(celltype * L)
{
 celltype * q;
 q=L;
 while (q->next!=NULL)
  q=q->next;
 return q;
}
celltype * MakeNull(celltype * & L)
{
 L=new celltype;
 L->next=NULL;
 return L;
}


void Insert(int x,celltype *p)
{
 celltype *temp;
 temp=p->next;
 p->next=new celltype;
 p->next->element=x;
 p->next->next=temp;
}


void Delete (celltype * p)
{
 celltype * q;
 if(p->next!=NULL)
 {
  q=p->next;
  p->next=q->next;
  delete q;
 }
}


celltype *Locate(int x,LIST L)
{
 celltype *p;
 p=L;
 while (p->next!=NULL)
  if(p->next->element==x)
   return p;
  else
   p=p->next;
  return p;
}

int main(int argc, char* argv[])
{
 return 0;
}
搜索更多相关主题的帖子: MAIN 函数 
2009-10-20 10:07
小真丁丁
Rank: 2
等 级:论坛游民
帖 子:36
专家分:18
注 册:2009-9-20
收藏
得分:0 
求教各位
2009-10-20 10:12
y2k_connect
Rank: 2
等 级:论坛游民
威 望:1
帖 子:15
专家分:61
注 册:2009-10-4
收藏
得分:20 
你的程序,想实现什么功能?
多解释几句。
2009-10-21 20:47
小真丁丁
Rank: 2
等 级:论坛游民
帖 子:36
专家分:18
注 册:2009-9-20
收藏
得分:0 
先建表,然后插入,删除吧~~
您也可以随便帮我写点实现的东西吧~~谢谢了~~刚学数据结构~~~~
2009-10-25 21:52
快速回复:怎么搞MAIN函数?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017036 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved