侠盗猎车手5中文破解版:这个程序哪里有错?查找LIST里的元素

来源:百度文库 编辑:神马品牌网 时间:2024/04/27 14:56:06
// 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;
}