N
Nikola
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;
}
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;
}