#include
#include
typedef struct TNode{
int data1;
int data2;
struct TNode *next;
}*List;
void CreateList(List &L,int n){
L=(List) malloc (sizeof(TNode));
L->next=null;
List p;
for(int i = 0;i<=n;i++){
p=(List) malloc (sizeof(TNode));
scanf("%d",&p->data1);
scanf("%d",&p->data2);
p->next=L->next;
L->next=p;
}//Create
void main(){
int n;
scanf("%d",&n);
}
求助请问怎么改才不出错
d:\c\mutiply\mutiply1.c(10) : error C2143: syntax error : missing ')' before '&'
d:\c\mutiply\mutiply1.c(10) : error C2143: syntax error : missing '{' before '&'
d:\c\mutiply\mutiply1.c(10) : error C2059: syntax error : '&'
d:\c\mutiply\mutiply1.c(10) : error C2059: syntax error : ')'
d:\c\mutiply\mutiply1.c(29) : fatal error C1004: unexpected end of file found
mutiply2.cpp
d:\c\mutiply\mutiply2.cpp(12) : error C2065: 'null' : undeclared identifier
d:\c\mutiply\mutiply2.cpp(12) : error C2440: '=' : cannot convert from 'int' to 'struct TNode *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
d:\c\mutiply\mutiply2.cpp(21) : error C2601: 'main' : local function definitions are illegal
d:\c\mutiply\mutiply2.cpp(26) : fatal error C1004: unexpected end of file found