Hi i am trying to create a programme that will let me enter car details in to an array and then let me search them after and bring up all the details but im having problems with one of the lines to do with the search. Here is the section of code that seems to be the problem (i have wrote more but am trying to reframe to put the whole code online)
Code:
int search(Car autos[], int size, int search_id)
{
bool found=false;
int i;
for (i=0; i<size; i++)
{
if (search_id == autos[i].carreg) { found = true; break;}
}
if (found)
return i;
else
return -1; //not found
and specifically this exact line
if (search_id == autos[i].carreg) { found = true; break;}
error c2784 comes up 9 times
greatful for any help
IAN