标题:帮我看看错在哪里
取消只看楼主
studythec
Rank: 1
来 自:安徽阜阳
等 级:新手上路
帖 子:31
专家分:5
注 册:2010-3-13
结帖率:100%
已结贴  问题点数:20 回复次数:1 
帮我看看错在哪里
想建立一单链表   
提示的信息为:
             fatal error C1903: unable to recover from previous error(s); stopping compilation
#include<iostream>
#include<string>
using namespace std;
struct stu
{
    int num;
    stu *next;
};
void main()
{
    stu H=Null;
    stu *s;
    int x;
    cin>>x;
    while(x!=NULL)
    {
        s=malloc(sizeof(Lnode));
        s->num=x;
        s->next=H;
        H=s;
        cin>>x;
    }
    while(H!=NULL)
    {
        cout<<H->num" ";
        H=H->next;
    }
    cout<<endl;
}
找半天没找到错在哪
搜索更多相关主题的帖子: next void previous include 
2010-03-24 21:06
studythec
Rank: 1
来 自:安徽阜阳
等 级:新手上路
帖 子:31
专家分:5
注 册:2010-3-13
得分:0 
stu H=Null;程序中是stu *H=NULL;

菜鸟一个,在校学习,多多指教!
2010-03-24 21:19



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




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

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