这是一个关于数据结构链表结点的相关问题


#include<iostream>
#include<conio.h>
#include<string>
#include<iostream>
using namespace std;

typedef struct 
{
string name;
float price;
}Book;
typedef  Book ElemType
typedef struct  LNode 
{
ElemType Elem;
LNode *Next;
}*LNod,List;
int main()
{


cout<<a[2];



getch();


return 0;
}


我定义了一个链表的结构,报错如下

--------------------Configuration: 线性表 - Win32 Debug--------------------
Compiling...
线性表.cpp
E:\数据结构\线性表.cpp(15) : error C2143: syntax error : missing ';' before ''
E:\数据结构\线性表.cpp(15) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

线性表.exe - 2 error(s), 0 warning(s)
为什么呢

typedef Book ElemType这一行你想干嘛?定义变量?定义变量为什么不加分号??改成typedef Book ElemType;