b***y 发帖数: 2799 | 1 ☆─────────────────────────────────────☆
DogInMan (underdog of underdogs) 于 (Fri Oct 24 10:50:18 2008) 提到:
......you should really debug your code then. think as a computer.
☆─────────────────────────────────────☆
barry (大狗) 于 (Fri Oct 24 12:09:19 2008) 提到:
我前后花了一个半小时,在纸上写,一遍遍检查,争取全对,结果最后上VS调试,还是
有两个错,弱啊。
node* reverse_list_every_two_nodes(node* p)
{
node *p1, *p2, *p3, *p4;
if (!p || !p->next)
return p;
p2 = p; p3 = p->next; p4 = p->next->next;
p->next = p4; p3- |
|