堆栈指针初始化为NULL并没有错


所有跟贴·加跟贴·新语丝读书论坛

送交者: heretic 于 2009-07-30, 15:14:52:

Sample Code:

# typedef struct list_t {
# double item;
# struct list_t *next;
# } list_t;
#
#
# list_t *st = NULL; /* To be used as our stack. Starts out as empty (NULL). */
#
# /* push: push f onto value stack */
# void push(double f)
# {
# /* Your code goes here. */
# }
#
# /* pop: pop and return top value from stack */
# double pop(void)
# {
# /* Your code goes here. */
# }




所有跟贴:


加跟贴

笔名: 密码: 注册笔名请按这里

标题:

内容: (BBCode使用说明