順序棧 鏈棧基本操作

2021-04-14 09:38:37 字數 1306 閱讀 4297

#include "stdafx.h"

#include "stdio.h"

#include "stdlib.h"

//*#define stack_max_size 7

int stackdata[stack_max_size] = ;

//*/

/*#define stack_max_size 14

int stackdata[stack_max_size] = ;

*//*順序棧型別定義*/

typedef struct

sqstack;

/*鏈棧型別定義*/

struct linkstack

;typedef struct linkstack lkstack;

/*順序棧基本操作函式定義部分*/

void sqinitialize(sqstack *stack)

int sqisempty(sqstack *stack)

int sqisfull(sqstack *stack)

int sqpush(sqstack *stack,int data)

else

}int sqpop(sqstack *stack,int *p)

else

}int sqgettop(sqstack *stack,int *p)

else

}void sqwritevalue(sqstack *stack,int array,int n)

void sqprintvalue(sqstack *stack)

/*鏈棧基本操作函式定義部分*/

順序棧 鏈棧基本操作

include stdafx.h include stdio.h include stdlib.h define stack max size 7 int stackdata stack max size define stack max size 14 int stackdata stack ma...

順序棧 鏈棧基本操作

include stdafx.h include stdio.h include stdlib.h define stack max size 7 int stackdata stack max size define stack max size 14 int stackdata stack ma...

順序棧 鏈棧基本操作

include stdafx.h include stdio.h include stdlib.h define stack max size 7 int stackdata stack max size define stack max size 14 int stackdata stack ma...