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

求大神出现!missing ')' before '&'解决办法

2012-10-12 
求大神出现!!!missing ) before &#includestdio.h#includemalloc.h#includestdlib.h#define ERR

求大神出现!!!missing ')' before '&'
#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
#define ERROR 0
#define OK 1 
#define ElemType int

typedef struct LNode
{
 int data;
 struct LNode *next;
}LNode,*LinkList;

int CreateLink_L(LinkList &L,int n)
{
// ´´½¨º¬ÓÐn¸öÔªËØµÄµ¥Á´±í
  LinkList p,q;
  int i;
  ElemType e;
  L = (LinkList)malloc(sizeof(LNode));
  L->next = NULL; // ÏȽ¨Á¢Ò»¸ö´øÍ·½áµãµÄµ¥Á´±í
  q = (LinkList)malloc(sizeof(LNode));
  q = L;
  for (i=0; i<n; i++) 
  {
scanf("%d", &e);
  p = (LinkList)malloc(sizeof(LNode)); // Éú³Éнáµã
p->data = e ;
  p->next = q->next;
  q->next=p;
q = q->next;
  }
  return OK;
}



int main()
{
 LinkList T;
 int a,n,i;
 ElemType x, e;
 printf("Please input the init size of the linklist:\n");
 scanf("%d",&n);
 printf("Please input the %d element of the linklist:\n", n);
 CreateLink_L(T,n);

}

[解决办法]
错误代码要贴全
我猜是int CreateLink_L(LinkList &L,int n) 这行?C里面没有引用,最好用指针

热点排行