大家帮我看看这个程序错误在哪?怎么改呢?#include "stdio.h"#include "malloc.h"#include "windows.h"typedef struct _Node{ char name[6]; char tel[8]; struct _Node *next;}Node,*List;void InitNode(List L){ if((L=(List)malloc(sizeof(Node)))=

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 04:01:26

大家帮我看看这个程序错误在哪?怎么改呢?#include "stdio.h"#include "malloc.h"#include "windows.h"typedef struct _Node{ char name[6]; char tel[8]; struct _Node *next;}Node,*List;void InitNode(List L){ if((L=(List)malloc(sizeof(Node)))=
大家帮我看看这个程序错误在哪?怎么改呢?
#include "stdio.h"
#include "malloc.h"
#include "windows.h"
typedef struct _Node
{
char name[6];
char tel[8];
struct _Node *next;
}Node,*List;
void InitNode(List L)
{
if((L=(List)malloc(sizeof(Node)))==NULL)
exit(-1);
L->next=NULL;
}
void AddNode(List L)
{
if((List p=(List)malloc(sizeof(Node)))==NULL)
exit(-1);
printf("Input Name:\n")
scanf("%s",p->name);
printf("Input Tel:\n")
scanf("%s",p->tel);
List p1=L->next,p2=L;
while(p1->next && strcmp(name,p->name)>0)
{
p1=p1->next;
p2=p2->next;
}
p->next=p2->next;
p1->next=p;
}
void PrintNode(List L)
{
List p=L->next;
while(p)
{
printf("name: %s\t\tTel: %s\n",p->name,p->tel);
p=p->next;
}
}
void main()
{
List L;
InitNode(L);
for(int i=0;i

大家帮我看看这个程序错误在哪?怎么改呢?#include "stdio.h"#include "malloc.h"#include "windows.h"typedef struct _Node{ char name[6]; char tel[8]; struct _Node *next;}Node,*List;void InitNode(List L){ if((L=(List)malloc(sizeof(Node)))=
很多分号没打
exit函数没有定义
while(p1->next && strcmp(name,p->name)>0) name是哪个节点的数据没有指明
改了一下~lz试调一下
#include "stdio.h"
#include "malloc.h"
#include "windows.h"
typedef struct _Node
{
char name[6];
char tel[8];
struct _Node *next;
}Node,*List;
void InitNode(List L)
{
if((L=(List)malloc(sizeof(Node)))==NULL)
exit(-1);
L->next=NULL;
}
void AddNode(List L)
{
List p=(List)malloc(sizeof(Node));
if(p==NULL)
{
printf("Error!\n");
return;
}
printf("Input Name:\n");
scanf("%s",p->name);
printf("Input Tel:\n");
scanf("%s",p->tel);
List p1=L->next,p2=L;
while(p1->next && strcmp(p1->name,p->name)>0)
{
p1=p1->next;
p2=p2->next;
}
p->next=p2->next;
p1->next=p;
}
void PrintNode(List L)
{
List p=L->next;
while(p)
{
printf("name:%s\t\tTel:%s\n",p->name,p->tel);
p=p->next;
}
}
void main()
{
List L;
InitNode(L);
for(int i=0;i

大家帮我看看这个程序错误在哪?怎么改呢?#include stdio.h#include malloc.h#include windows.htypedef struct _Node{ char name[6]; char tel[8]; struct _Node *next;}Node,*List;void InitNode(List L){ if((L=(List)malloc(sizeof(Node)))= 这道题怎么写呢?请大家帮我看看 请大家帮我看看这句有无错误.急,Listen carefully to all kinds of voices that bring inspiration to me 如有错怎么改 请大家帮我看看这个字怎么读 英语翻译大家帮我看看这个怎么翻? 大家看看下面这个句子怎么改在公共场所,我们应当保持清洁改病句, 请大家帮我看看这个程序怎么不能得出正确答案sort(int *a[10]){ int i,j,k; for(i=0;i 大家帮我看看,这个是什么意思? 大家帮我看看这个成语是 大家帮我看看这个人是谁. 请大家帮我看看以下英文的语病怎么改呢In auto industry ,Cadillac created innumerable firsts,created many luxury car industry standard. 请大家帮我看看英语作文有没有错误 帮我看看下面这个问题我改怎么回答?我喜欢这个人,我改怎么回答啊? 求大神帮我看看matlab我编的程序错在哪里,怎么修改?要编的是这个方程,nT=88,C0,G0,Ck,Gk都是88*88矩阵,u(s)经傅里叶变换为88*2049矩阵,B为单位阵,s为2049*1的矩阵.求X(s).我编的程序如下,有错误, 求英语大神帮我看看这个句子哪里有错误,如题,请大神帮我看看这句子哪错了 帮我改下 Because its function is similar to the cultivation of crops’ greenhouse,hence the name “the greenhouse effect”.我在word上输 请帮我看看这句话错在哪 In my opinion,I think students should not date as it can affect their studies.不需要改这个句子的句式 就请告诉我原句中错误的地方就好了谢谢 请帮我看看这个短文有哪些错误,该怎么改正, 请大家帮我看看这个,到底选择什么呢?请快.