this is my updated code. will it work ??
compete code is in my attached my ".c" file
int calculate(char a, int b, int c)
{
if(a=='+')
return (b+c);
else if(a=='-')
return (b-c);
else if(a=='*')
return (b*c);
else if(a=='/')
return (b/c);
}
int main()
{
char expr[]="-+9+28*+4863";
QUEUE *q = CreateQueue();
char data1[8],data2[8],data[8];
int i=0,j=1,k=2;
int a,b,r;
char *dataout,*datain;
while((expr!='\0'))
{
if(ispunct(expr)&&isdigit(expr[j])&&isdigit(expr[k]))
{
data1[0]=expr[j];data1[1]='\0';
data2[0]=expr[k];data2[1]='\0';
a=atoi(data1);b=atoi(data2);
r=calculate(expr,a,b);
itoa (r, data, 10);
datain=data;
Enqueue(q, datain);
i=i+3;j=j+3;k=k+3;
}
else
{
data[0]=expr;data[1]='\0';
datain=data;
Enqueue(q,datain);
i++;j++;k++;
}
}
while(!EmptyQueue(q))
{
NODE *temp = q->front;
strcpy(dataout,q->front->data);
printf("%s",dataout);
q->front=q->front->link;
q->count--;
free(temp);
}
return 0;
}
and my compiler is showing an error
"implict declaration of function iota in is invalid in C99".
i am using Xcode in mac OS X