在这里插入代码片
#define _CRT_SECURE_NO_DEPRECATE
#include
#include <stdio.h>
using namespace std;
/*将任意进制数转换为各进制数并打印
*@auther:CK
*/
/*宏定义
*/
typedef char SElemType;
typedef struct {
SElemType *base;
SElemType *top;
int stacksize;
}SqStack;
/进值转换类型/
typedef enum {
BIN = 2,
OCT = 8,
DEX = 10,
HEX = 16,
}Notation;
#define MAXSIZE 100
#define False 0
#define True 1
typedef bool Status;
/*函数声明
*/
void Stack_Init(SqStack &s);
void Printf(SqStack &s, Notation numchange);
SElemType Num_Change(int &date,int numchange);
void Change_Num(char *realdate,Notation numchange, int &date);
Status Push(SqStack &s, SElemType date);
Status Pop(SqStack &s, SElemType &date);
/*主函