标题:编一个输出链表的函数print
取消只看楼主
p18844058918
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2016-4-25
结帖率:100%
已结贴  问题点数:20 回复次数:1 
编一个输出链表的函数print
#include<stdio.h>
#include<stdlib.h>
#define LEN sizeof(struct Student)
struct Student
{
    long num;
    float score;
    struct Student *next;
};

int n;
void print(struct Student *head)
{
    struct Student *p;
    printf("\nNOW,These %d records are:\n",n);
    p=head;
    if(head!=NULL)
        do
        {
            printf("%ld %5.1f\n",p->num,p->score);
            p=p->next;
        }while(p!=NULL);
}
为什么编译时有错呢?希望有高手指点,谢谢!
错误提示如下:
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/file-1.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
        
搜索更多相关主题的帖子: include records 
2016-05-02 22:24
p18844058918
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2016-4-25
得分:0 
谢谢你们!
2016-05-09 10:28



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-464328-1-1.html




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

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