I am trying to get started with Problem Set 3. I thought first to make a linear search program that would take an integer as an input and then search an array to see if the integer is within the array. I could make the array of numbers 10:19 with this code:

``````int main(void)
{

int values[ 10 ];
int g;

for (g = 0; g < 10; g++ ) {
values[ g ] = g + 10; /* set element at location i to i + 10 */
printf("%i", values[g]);
}
printf("\n");
}
``````

I then hoped to test the search function from helpers.c, by pasting the code below my array above.:

``````bool search(value, int values[], int m)
{
// TODO: implement a searching algorithm
for (int i = 0; i < m; i++)
{
if ( value == values[i])
return true;
}
return false;
}
``````

I originally thought to test it by placing the code within the main function, but I received "error: function definition is not allowed here." Now, I place it outside of the main function, though I am not sure how to give this function an input.

`````` error: expected identifier
bool search(value, int values[], int m)
^
error: use of undeclared identifier 'm'
for (int i = 0; i < m; i++)
^
error: use of undeclared identifier 'value'
if ( value == values[i])
^
error: use of undeclared identifier 'values'
if ( value == values[i])
``````

Can I get some help with how to proceed?