Add syntax highlight

This commit is contained in:
Stepfen Shawn 2020-04-08 18:30:07 +08:00 committed by GitHub
parent 90e6ee0771
commit 88de94d1b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,25 +13,35 @@ You need to only import the **stack.h**
### Public interface ### Public interface
``` void initStack(); ``` ```c
void initStack();
```
Initializes the stack with a capacity of 10 elements. Initializes the stack with a capacity of 10 elements.
``` void push(void * object); ``` ```c
void push(void * object);
```
pushs the argument onto the stack pushs the argument onto the stack
``` void * pop(); ``` ```c
void * pop();
```
pop: pops the top element of the stack from the stack. pop: pops the top element of the stack from the stack.
assumes: stack not empty. assumes: stack not empty.
``` int size(); ``` ```c
int size();
```
gets the number of elements of the stack. gets the number of elements of the stack.
``` int isEmpty(); ``` ```c
int isEmpty();
```
returns 1 if stack is empty otherwise 0. returns 1 if stack is empty otherwise 0.