数据结构题,高手指点指点,谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/18 03:27:15
源程序
#include "stdio.h"
typedef int Status InsertOrderList (SqList &a,ElemType x)
{if (a.length==a.listsize) return (OVERFLOW);
else{
i=a.length-1;
while (i>=0 && x<a.elem[i]) i--;
i<0 || x>=va.elem[i]
for(j=a.length-1;j>=i+1;j--)
a.elem[j+1]=a.elem[j];
a.elem[i+1]=x;
a.length++;
return OK;
}
}

出现的错误是:
实验二.cpp
E:\数据结构\实验文件夹\实验二.cpp(2) : error C2146: syntax error : missing ';' before identifier 'InsertOrderList'
E:\数据结构\实验文件夹\实验二.cpp(2) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
具体该怎么改,麻烦下

error C2146: syntax error : missing ';' before identifier 'InsertOrderList'
这是编译时出现的提醒,你如果在VC++环境编译该有序数组插入算法,就要建立全面的运行语句.