问题描述
编译器说:函数未声明怎么来的?
帮助!
#include< stdio.h>
#include< stdlib .h>
#include< time.h>
struct lista {
int element;
struct lista * next;
} * pocetak;
main()
{
struct lista * q,* nova;
int i;
pocetak = NULL;
srand(time(NULL));
for(i = 0; i< 5; i ++)
{
q =(struct lista *)mallloc(sizeof(struct lista));
q-> element = rand()%100;
pocetak = q;
q-> next = NULL;
}
q = pocetak;
printf(" Nasumicni brojevi:\ n");
while(q != NULL)
{
printf(" \ n%d",q-> element);
q = q- >下一个;
}
printf(" \ nNaopako:\ n");
返回0;
}
compiler says: function undeclared how come???
help!
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
struct lista{
int element;
struct lista *next;
}*pocetak;
main()
{
struct lista *q, *nova;
int i;
pocetak=NULL;
srand(time(NULL));
for(i=0;i<5;i++)
{
q=(struct lista*) mallloc(sizeof(struct lista));
q->element=rand()%100;
pocetak=q;
q->next=NULL;
}
q=pocetak;
printf("Nasumicni brojevi:\n");
while(q!=NULL)
{
printf("\n%d",q->element);
q=q->next;
}
printf("\nNaopako:\n");
return 0;
}
推荐答案
你想在这里再看看这一行。
(此外,你不需要演员。)
-
/ - Joona Palaste(pa*****@cc.helsinki.fi)-------------芬兰-------- \
\ - --- ------------------规则! -------- /
战争!咦!天哪,你们呀!到底有什么好处呢?我们询问Quimby市长。
- Kent Brockman
You''ll want to have a second look at this line here.
(Besides, you don''t need the cast.)
--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"War! Huh! Good God, y''all! What is it good for? We asked Mayor Quimby."
- Kent Brockman
You''我想在这里再看看这一行。
You''ll want to have a second look at this line here.
嘿,在那里,不幸的是,我自己做了好几次。
-
Christopher Benson-Manica |我*应该*知道我在说什么 - 如果我
ataru(at)cyberspace.org |不,我需要知道。火焰欢迎。
Heh, been there, done that several times myself, unfortunately.
--
Christopher Benson-Manica | I *should* know what I''m talking about - if I
ataru(at)cyberspace.org | don''t, I need to know. Flames welcome.
这篇关于错在哪里???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!