2017-05-22 13:52:30 +00:00
|
|
|
typedef struct{
|
|
|
|
char c;
|
|
|
|
int v;
|
|
|
|
} TEST;
|
|
|
|
|
2017-05-22 13:26:21 +00:00
|
|
|
#include "source/handyalgs.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int argc, char* argv[]){
|
|
|
|
Stack s = newStack();
|
|
|
|
for (int i = 2; i < 500; i+=3){
|
2017-05-22 13:52:30 +00:00
|
|
|
TEST t;
|
|
|
|
t.v = i;
|
|
|
|
pushToStack(t, &s);
|
2017-05-22 13:26:21 +00:00
|
|
|
}
|
|
|
|
printStack(s);
|
|
|
|
for (int i = 0; i < 100; i++){
|
|
|
|
popFromStack(&s);
|
|
|
|
}
|
|
|
|
printStack(s);
|
|
|
|
}
|