2016年7月25日11:03:37
利用链表模拟栈,将十进制转换成对应的八进制,二进制,八进制
#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
typedef int DataType ;
typedef struct node
{
DataType stack;
struct node * pNext;
}linkList;
typedef struct stack
{
linkList * pTop;
linkList * pBottom;
}linkStack;
void initLinkStack(linkStack * S);
int isEmpty(linkStack * S);
int pushLinkStack(linkStack * S,DataType element);
int popLinkStack(linkStack * S,DataType * element);
int getTop(linkStack * S, DataType * element);
int getLength(linkStack * S);
void destroyLinkStack(linkStack * S);
void initLinkStack(linkStack * S)