错在哪里??? [英] Where's the mistake???

查看:55
本文介绍了错在哪里???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编译器说:函数未声明怎么来的?

帮助!

#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;
}

推荐答案

Nik ola< az ***** @ inet.hr>潦草地写了下面的内容:
Nikola <az*****@inet.hr> scribbled the following:
编译器说:函数未声明怎么来的???
帮助!
#include< stdio.h>
#include< stdlib.h>
#include< time.h>
q =(struct lista *)mallloc(sizeof(struct lista));
compiler says: function undeclared how come???
help!
#include<stdio.h>
#include<stdlib.h>
#include<time.h> q=(struct lista*) mallloc(sizeof(struct lista));




你想在这里再看看这一行。


(此外,你不需要演员。)


-

/ - Joona Palaste(pa*****@cc.helsinki.fi)-------------芬兰-------- \

\ - http://www.helsinki.fi/~palaste --- ------------------规则! -------- /

战争!咦!天哪,你们呀!到底有什么好处呢?我们询问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


Nikola写道:
编译器说:函数未声明如何来???


你问一个简单/愚蠢的问题,甚至不能提供

我们编译器抱怨的功能。下次具体更多



帮助!
#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));


mallloc() - > malloc()

q-> element = rand()%100;
pocetak = q;
q-> next = NULL;
}
q = pocetak;
printf(" Nasumicni brojevi:\ n");
while(q!= NULL)
{
printf(" \ n) %d",q->元素);
q = q-> next;
}
printf(" \ nNaopako:\ n");

返回0;
}
compiler says: function undeclared how come???
You ask a simple/silly question and don''t even supply
us what funtion the compiler complains about. Be more
specific next time.
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));
mallloc() -> malloc()
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 I Palaste< pa ***** @ cc.helsinki.fi>这样说:
Joona I Palaste <pa*****@cc.helsinki.fi> spoke thus:
q =(struct lista *)mallloc(sizeof(struct lista));
q=(struct lista*) mallloc(sizeof(struct lista));


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.


这篇关于错在哪里???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆