代码实现
void dumpDoubList(st_doubNode * head){
if(NULL == head){
return;
}
st_doubNode * p = NULL;
printf("========= Dump Double List %p ===========\n\t", head);
p = head;
while (NULL != p){
printf(" %d ", p->data);
p = p->next;
}
printf("\n");
printf("===================================\n");
}
调试编译
gcc doublist.c listMain.c -DDEBUG -o a.exe
调试输出
========= Dump Double List 0xa08010 ===========
22 32 19 53 0 47 29 116 4 6
===================================