linux命令执行过程:这个程序哪里有错?查找LIST里的元素

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/06 02:55:19
// linked.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#define MAXSIZE 8
typedef struct
{
int elem[8];
int last;
}Seqlist;
Seqlist L={1,2,3,4,5,6,7,8};
Seqlist B={2,3,4,5,6,7,8,9};

int Locate(Seqlist L,2)
{
//e=2;
int i=0;
while((i<=L.last)&&(L.elem[i]!=2))
i++;
if(i<=L.last)
return(i+1);
else
return(-1);
}
int main(int argc, char* argv[])
{
// int Locate(Seqlist L,int 2);

return 0;
}