-
I do it with LinkedList do you want to.
-
class stack
top=-1;Stack top indication.
void push( int item) pushes the element into the stack top ++
stack[top ] = item;
int pop() stacks, the top element of the stack goes out of the stack and returns.
top--;
return stack[top+1];
int peek( ) takes the current top element of the stack s and returns.
return stack[top];
void clearstack() destroys stack top = -1;
maxsize = 0;}}
-
You can use an indefinite-length array to store data, and when you take it, test the length of the array first, and then take the data according to the length.
-
dim a() creates an array of indefinite length, but the upper and lower limits of a() must be redefined when assigned or called.
The following x and y are assigned where they are used, i.e., the upper and lower limits of the a() array.
x=1 'a() array.
y=10 ''a() array.
The following statement redefines the a() array to the desired length.
redim a(x to y)
Assign a value to a().
for i=lbound(a) to ubound(a)a(i)=i
next'Invoke.
msgbox a(ubound(a)) shows the value of the last element of a().
-
#include
#define initsize 20
#define increment 10
typedef char elemtype;
typedef struct stackstack;
void initstack(stack &s) initializes the stack into the stack, and appends the stack space when the stack is full.
int empty(stack &s) Void clear(stack &s).
void conversion(int n,int n) base conversion}while(!empty(s))
clear(s);
void main()
The chin is pointed and the face is thin, for example, the melon seed face belongs to the V-shaped face
ints need to be expressed according to the size of the compiler. >>>More
Hello! Here's how you can tell if a tire needs to be replaced >>>More
Now they are all multi-functional smart machines,LZ your requirements are very high,At least the power bank currently used by smart machines is not so powerful...
1.Move to another city
2.Destroy everything that reminds you of the other person or touches the scene: letters, etc. 3Open your heart and accept other boys >>>More