Stack (C 언어)
C++ stack container 함수 정리 및 C stack 구현 예시 #include #include #include #include #define MAX_STACK_SIZE 1000 #define MAX_INPUT_SIZE 100 //stack에 들어갈 data 구조체 typedef struct { int xPos; int yPos; } stackMemNode; //stack 구조체 typedef struct { stackMemNode memory[MAX_STACK_SIZE]; //data가 저장될 배열 int Top; //stack의 top 위치를 가리키는 변수 } stack; bool empty(stack *); void pop(stack *); void push(stack *, stackMe..
2021. 1. 30. 10:04