int main(){ LL_t* s=creat(); if( isEmpty(s) == 1 ) printf("stack is empty\n"); else printf("stack is NOt empty\n"); push(s,1); push(s,2); push(s,3); push(s,4); push(s,5); push(s,6); LLprint(s); if( isEmpty(s) == 1 ) printf("stack is empty\n"); else printf("stack is NOt empty\n"); pop(s); pop(s); pop(s); LLprint(s); pop(s); pop(s); pop(s); LLprint(s); if( isEmpty(s) == 1 ) printf("stack is empty\n"); else printf("stack is NOt empty\n"); return 0; }
// Lprintf int Lprintf(const char *fmt, ...) { int i; char buf[256]; va_list arg = (va_list)((char*)(&fmt) + 4); /*4是参数fmt所占堆栈中的大小*/ i = vsLprintf(buf, fmt, arg); buf[i] = 0; LLprint(buf, i); return i; }