| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 537 人关注过本帖
标题:[求助]程序在编译时出错
只看楼主 加入收藏
piao317
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-4-13
收藏
 问题点数:0 回复次数:2 
[求助]程序在编译时出错

#define listsize 100
#include <stdio.h>
#include <stdlib.h>
void error(char *message)
{printf("%d\n",message);
exit(1);
}
struct seqlist{
int data[listsize];
int length;};
void initlist(struct seqlist *l)
{l->length=0;}

void inserlist(struct seqlist *l,int x,int i)
{int j;
if (i<0||i>l->length)
error("position error");
if (l->length>=listsize)
error("overflow");
for(j=l->length-1;j>=i;j--)
l->data[i]=x;
l->length++;
}

void displaylist(struct seqlist *l)
{int i;
puts("now the list is:");
for(i=0;i<l->length;i++)
printf("\n");
return;}
void main()
{struct seqlist *SEQA;
int i,n,t;
SEQA=(struct seqlist*)malloc(sizeof(struct seqlist));
initlist(SEQA);
clrscr();
puts("please input the size of the list:");
scanf("%d",&n);
puts("please input the elements of the list one by one:");
for(i=0;i<n;i++)
{scanf("%d",&t);
insertlist(SEQA,t,i);}
displaylist(SEQA);}
运行出现undefinsd symbo '_insertlist ' in moudle 11.c(11.c是保存文件名)
小弟先谢谢各位了

搜索更多相关主题的帖子: int length void 
2006-04-19 15:19
cdmalcl
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:24
帖 子:4091
专家分:524
注 册:2005-9-23
收藏
得分:0 
未定义的符号 '_insertlist ' 在模块 11.c
2006-04-19 17:15
piao317
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-4-13
收藏
得分:0 

我改正了
但是当我输入数字的时候运行结果很乱
不是所期望 的结果
还想麻烦各位帮我一下

2006-04-20 10:27
快速回复:[求助]程序在编译时出错
数据加载中...
 
   



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

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