首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

小弟我的break错在哪里

2012-02-24 
我的break错在哪里reverse_list(node*head){node*p,*q,*rpheadqp- nextrq- nextwhile(q!NULL){

我的break错在哪里
reverse_list(node   *head)
{
    node   *p,*q,*r;
    p=head;
    q=p-> next;
    r=q-> next;
      while(q!=NULL);
    {   r=q-> next;
        q-> next=p;
        p=q;
        if(q-> next!=NULL)
        q=r;
          else
          break;       /*---------------------记号*/
    }
    head-> next=NULL;
    head=r;
    r-> next=q;
    printf( "\nthe   reversed   list   is: ");
    while(r-> next!=NULL)
{
      printf( "%d\t ",r-> num);
        r=r-> next;
}
偶在写一个函数时出现:
错误   struct~2.c   72:   'break '   位置错在   reverse_list   函数中;
我实在找不错在哪里?郁闷   还望各位能指点一二!谢谢


[解决办法]
while(q!=NULL);
多了分号?

热点排行