标题:[求助]vs6C++这些空该怎么填啊?
只看楼主
drummer444
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-7-9
 问题点数:0 回复次数:2 
[求助]vs6C++这些空该怎么填啊?

#include <iostream.h>
#include<iomanip.H>
struct LinkNode
{
int data;
LinkNode * next;
};
LinkNode *p,*t;

void CreateLink(LinkNode *h)
{
int k;
char c='y';
t=new LinkNode;
h->next=t;

while(c!='n')
{
cout<<"Please input interge:";
cin>>k;
____________________;
p=t;
t=new LinkNode;
p->next=t;
cout<<"Do you continuity(y/n):";
cin>>c;
}
__________________;
delete t;
}

void Traversal(LinkNode *h)
{
LinkNode *p;
p=h->next;
while(p!=NULL)
{
cout<<setw(5)<<p->data;
_____________________;
}
cout<<endl;
}

void mian()
{
LinkNode *l;
_____________________;
CreateLink(l);
_____________________;
}

搜索更多相关主题的帖子: include 
2007-07-09 08:58
Arcticanimal
Rank: 3Rank: 3
等 级:论坛游民
威 望:7
帖 子:341
专家分:20
注 册:2007-3-17
得分:0 
以下是引用drummer444在2007-7-9 8:58:22的发言:

#include <iostream.h>
#include<iomanip.H>
struct LinkNode
{
int data;
LinkNode * next;
};
LinkNode *p,*t;

void CreateLink(LinkNode *h)
{
int k;
char c='y';
t=new LinkNode;
h->next=t;

while(c!='n')
{
cout<<"Please input interge:";
cin>>k;
t->data = k;
p=t;
t=new LinkNode;
p->next=t;
cout<<"Do you continuity(y/n):";
cin>>c;
}
cout<<"The End..."<<endl; //?[em02]
delete t;
}

void Traversal(LinkNode *h)
{
LinkNode *p;
p=h->next;
while(p!=NULL)
{
cout<<setw(5)<<p->data;
p = p->next ;
}
cout<<endl;
}

void mian()
{
LinkNode *l;
l = new LinkNode;
CreateLink(l);
Traversal( l );
}


try new catch
2007-07-09 11:27
leeco
Rank: 4
等 级:贵宾
威 望:10
帖 子:1026
专家分:177
注 册:2007-5-10
得分:0 
第二个空是p->next=NULL;
顺便说一下,你们老师写的代码一点没水准
2007-07-09 16:42



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




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

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