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