sort an array using a function

Please help! i have an assignment due for tomorrow. This is what i have been asked to do,

1) Creates an array containing 100 random double numbers in the [0,250) range;
2) Sorts them in descending order;
3) Prints the contents of the sorted vector out. The sorting should be coded as a separate function double* sort_array(double* ).

This is my attempt at it but an error is coming up
" undefined reference to 'sort_array(int*)' "
Any idea why this is happening?

when i change is from int to double an error: " invalid types 'double [100][double]' for array subscript " ? what could be causing that? i am new to programming and just can't figure out what's wrong! any other advice? :/

There's lots of things wrong with it, I went a head and fixed your formatting and posted it in code tags. For future reference, wrap all your code in code tags "[ code ] [ /code ]" (without the spaces).

You never actually defined the function sort_array, looks like you copy pasted some of your code in the wrong place. move the code from lines 37 to 41 to the end of your main function and the code from line 11 what was line 26, also remove the semicolon from the end of it.