#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#define SIZE 7
typedef struct{
int key;//数值
int i;//阶数
} Stack;
Stack stack[100];
Stack *base = stack;
Stack *top = stack - 1;
//Stack *top = stack++;//隐患在是否改变base指针的值
void push(Stack *s){
++top;
top->i = s->i;
top->key = s->key;
printf("after push%d\n", top->key
堆栈实现进制转换(二进制转十进制)
最新推荐文章于 2020-02-20 22:04:21 发布