Error with functions!! HELP!

void sort_array(struct employee_data_structure a[], int record_number); // Function Declaration

sort_array(array_of_structures, record_number); // function call

1
2
3
4
5
6
7
8
9
void sort_array(struct& employee_data_structure array_of_structures[], int number_slots) // Line 231
{
    int index_next_smallest;
    for (int index = 0; index < number_slots -1; index ++)
    {
        index_next_smallest = index_smallest(array_of_structures, index, number_slots);
        swap_values(array_of_structures, index, index_next_smallest);
    } // Function definition
}


so i'm having these errors saying error: variable or field 'sort_array' declared void , error: expected primary-expression before 'struct' and error: expected primary-expression before 'int'..

and i don't know if the bug were really there but yea that's what it says that i'm having those error in line 231.
closed account (j3Rz8vqX)
Is there the possibility of multiple functions with the same name are being declared?

If the functions are in header files, use (ifndef, else).
Hey, I believe I am in your class over at BCC. Professor Simber. Were you able to figure out this error Jekjek? I am still having the same issue too.
not yet but prof Simber emailed me how to fix it and i'm trying to fix it now. He said that the error is not in that code and there's something that causes confusions between my functions and variables.
Topic archived. No new replies allowed.