push(equation, pop(equation) + pop(equation));
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的流行音乐
int pop(struct stack *st)
{
int c;
if (st->top == -1)
{
printf("Stack is empty");
return NULL;
}
c = st->arr[st->top];
st->top--;
return c;
}
Run Code Online (Sandbox Code Playgroud)
这是推动
void push(struct stack *st, int * c)
{
if (st->top == 99)
{
printf("Stack is full");
return ;
}
printf("TOP = %d\n", st->top);
st->top++;
printf("TOP = %d\n", st->top);
st->arr[st->top] = c;
}
Run Code Online (Sandbox Code Playgroud)
它说push的第二个arg是从一个没有强制转换的整数制作一个指针,但我不明白为什么如果有人能解释它我会很感激.
c ×1