so this is my code, it's suppose to locate the first occurrence of value and return its position and return -1 if not found. i dont understand why it's giving me this error, please help!
Code:int list_search( itemType value, List L ) {
if (L->count==0) {
printf("Warning: empty array!\n");
}
else {
int i;
for (i=0; i<L->count; ++i);{
if (L->data[i]==value) {
return i+1;
break;
}
}
return -1;
}
}