一直提示syntax error : ';',我实在是找不到错误,求大神看看程序.
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/17 08:52:01
一直提示syntax error : ';',我实在是找不到错误,求大神看看程序.
#include "stdio.h"
#include "stdlib.h"
typedef struct node{
int data;
struct node*next;}numberlist;
struct node*creatlink()
{numberlist*h=NULL;
int n,i;
numberlist*p,*s;
for(i=1;idata=n;
numberlist*s=(numberlist*)malloc(sizeof(numberlist));
if(!h) p=h=s;
else{ p->next=s;
p=p->next;}
}
return h;
}
#include "stdio.h"
#include "stdlib.h"
typedef struct node{
int data;
struct node*next;}numberlist;
struct node*creatlink()
{numberlist*h=NULL;
int n,i;
numberlist*p,*s;
for(i=1;idata=n;
numberlist*s=(numberlist*)malloc(sizeof(numberlist));
if(!h) p=h=s;
else{ p->next=s;
p=p->next;}
}
return h;
}
看下面说明,两个地方:
#include "stdio.h"
#include "stdlib.h"
typedef struct node{
int data;
struct node*next;
}numberlist;
struct node*creatlink()
{
numberlist*h=NULL;
int n,i;
numberlist*p,*s;
for(i=1;i<=10;i++)//这里多了个分号
{printf("请输入一个整数:\n");
scanf("%d",&n);
s->data=n;
s=(numberlist*)malloc(sizeof(numberlist));//去掉前面的numberlist*
if(!h) p=h=s;
else{ p->next=s;
p=p->next;}
}
return h;
}
#include "stdio.h"
#include "stdlib.h"
typedef struct node{
int data;
struct node*next;
}numberlist;
struct node*creatlink()
{
numberlist*h=NULL;
int n,i;
numberlist*p,*s;
for(i=1;i<=10;i++)//这里多了个分号
{printf("请输入一个整数:\n");
scanf("%d",&n);
s->data=n;
s=(numberlist*)malloc(sizeof(numberlist));//去掉前面的numberlist*
if(!h) p=h=s;
else{ p->next=s;
p=p->next;}
}
return h;
}
一直提示syntax error : ';',我实在是找不到错误,求大神看看程序.
fortran程序出现错误,错误 1 error #5082:Syntax error,found IDENTIFIER
急:SAS程序问题我的程序中有这样一段错误提示,请问有谁知道是程序哪里出了问题啊?ERROR:Read Access V
lingo 程序出错 syntax error has occurred
帮我看看这段lingo代码,我不明白为什么一直出现error code11的错误
matlab曲线拟合程序,下面的程序总是 提示错误是Error in ==> dpoly at 4 p=polyfit(
请高手来帮我看看这个matlab程序哪里错了 提示Error using ==> mtimes Inner matrix
Syntax error on token(s),misplaced construct(s) 什么错误?
求大神帮我看看程序的运算结果
求大神编写下程序看看是如何写的.
C语言初学者求助,一个程序设计题,大神看看我编的程序是否有错误.
帮忙检查这篇文章有什么错误,我实在找不到