| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 590 人关注过本帖
标题:帮忙找下错误啊
取消只看楼主 加入收藏
IT飞飞
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2012-9-8
结帖率:66.67%
收藏
已结贴  问题点数:10 回复次数:1 
帮忙找下错误啊
#include "stdafx.h"
#include<stdio.h>
#include<string.h>

typedef int typedata


typedef struct node
{
    typedata data;
    struct node *next;


}Listnode;


Listnode *Creat(Listnode *head)
{
    Listnode *p;
     
    int x;
    printf("请输入x的值");
    scanf("%d",&x);
    while(x!=flag)
    {
   
    p=(Listnode*)malloc(sizeof(Listnode));
    p->date=x;
    p->next=head;
    p=head;

    }
 

 return (head);


}
   


 Lnode * Lcoate(Lnode *head)
 {
  Lnode *p,*q,*r;

  
  while(q&&p!=q)
  { p=head;
    q=p->next;
    q=q->next;
    p=p->next;
    r=q;
    r->next=p;
   
  }
 
 
 
 }


int main(int argc, char* argv[])
{     
   Creat(head);
Lcoate(head);
  

    return 0;
};




原题是   设计一个算法,利用单链表中的各个原来的结点空间将一个单链表就地转置。这是错误提示:

Compiling...
lesson1.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\lesson1\lesson1.cpp(12) : error C2143: syntax error : missing ';' before '<class-head>'
C:\Program Files\Microsoft Visual Studio\MyProjects\lesson1\lesson1.cpp(12) : fatal error C1004: unexpected end of file found




搜索更多相关主题的帖子: return include next 
2012-09-16 15:48
IT飞飞
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2012-9-8
收藏
得分:0 
回复 2楼 寒风中的细雨
可这样  错误就更多了 啊
2012-09-16 16:23
快速回复:帮忙找下错误啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015929 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved