stk_s * stk_create(size_t size); void此stk_delete(stk_s * this); int stk_push(stk_s * this,unsigned long data); int stk_pop(stk_s * t他的,unsigned long * p_data); - Emmanuel C-FAQ: http://www.eskimo.com/~scs/C-faq/faq。 HTML C是一个尖锐的工具No way in standard C, because the machine stack is not required by thestandard, but you can write your own stack system in standard C if youare interested in. You need an index, an array an three functions, forexample:typedef struct{size_t sp;size_t size;unsigned long *p;}stk_s;int stk_init (stk_s *this, unsigned long *p, size_t size);int stk_push (stk_s *this, unsigned long data);int stk_pop (stk_s *this, unsigned long *p_data);You also could have a full dynamic version:stk_s *stk_create (size_t size);void this stk_delete (stk_s *this);int stk_push (stk_s *this, unsigned long data);int stk_pop (stk_s *this, unsigned long *p_data);--EmmanuelThe C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html"C is a sharp tool" 这篇关于推送和弹出堆栈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-07 02:39