| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 446 人关注过本帖
标题:请看一下这端程序的问题。
只看楼主 加入收藏
uselessID
Rank: 2
等 级:论坛游民
帖 子:44
专家分:76
注 册:2011-8-22
结帖率:100%
收藏
已结贴  问题点数:2 回复次数:2 
请看一下这端程序的问题。
小弟初学数据结构,想用c实现插入表的操作,请大家看看下面的程序有什么问题呢,开始编译就出现f:\pushuxiang\pu\insert.c(46) : fatal error C1010: unexpected end of file while looking for precompiled header directive
不知道是什么原因。

#define ERROR 0
#define OK 1
struct STU
{char name[20];
char stuno[10];
int age;int score;
}stu[50];
struct LIST
{struct STU stu[50];
int length;
}L;

int printlist(struct LIST L)
{int i;
printf("name stuno age score\n");
for(i=0;i<LENGTH;I++)
    printf("%S %S %d %d",L.stu[i].name,L.stu[i].stuno,L.stu[i].age,L.stu[i].score);
printf("\n");
}

int listinsert(struct LIST*L,int i,struct STU e)
{struct STU *p,*q;
if(i<1||i>L->length+1)
return ERROR;
q=&(L->stu[i-1]);
for(p=&L->stu[L->length-1];p>=q;--p)
*(p+1)=*p;
*q=e;
++L->length;
return OK;
}//Listinsert Before i

main()
{
    struct STU e;
    L.length=0;
    strcpy(e.name,"pushuxiang);
    strcpy(e.stuno,"000001");
    e.age=23;
    e.score=150;
    listinsert(&L,1,e);
    printlist(L);
    printf("List length now is %d.\n\n",L.length);
}
搜索更多相关主题的帖子: unexpected file 
2011-08-24 11:45
voidx
Rank: 12Rank: 12Rank: 12
来 自:邯郸
等 级:火箭侠
帖 子:1250
专家分:3538
注 册:2011-4-7
收藏
得分:1 
惨不忍睹,楼主仔细读读自己的代码,把里面的错都改一改
2011-08-24 14:35
uselessID
Rank: 2
等 级:论坛游民
帖 子:44
专家分:76
注 册:2011-8-22
收藏
得分:0 
回复 2楼 voidx
初学者,见笑见笑。
2011-08-24 14:51
快速回复:请看一下这端程序的问题。
数据加载中...
 
   



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

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