27 lines
500 B
C
27 lines
500 B
C
#ifndef PILE_H_
|
|
#define PILE_H_
|
|
|
|
#include "num.h"
|
|
|
|
struct List {
|
|
struct NumContainer i;
|
|
struct List* next;
|
|
};
|
|
|
|
struct Pile {
|
|
struct List* l;
|
|
unsigned int height;
|
|
};
|
|
|
|
void init( struct Pile* p );
|
|
void push( struct Pile* p, struct NumContainer i );
|
|
struct NumContainer top( struct Pile* p );
|
|
void print( struct Pile* p );
|
|
void pop( struct Pile* p );
|
|
void end( struct Pile* p );
|
|
void getlastnums( struct NumContainer* i, struct NumContainer* j, struct Pile* pile);
|
|
|
|
|
|
|
|
|
|
#endif // PILE_H_
|