could someone look over my selection sort function and let me know if my logic is messed up? I also get teh following error " cannot convert creativetype to int"
void selectionSort(creative_type creativeArray[], int length)
{
int i;
int smallest;
int location;
int temp; //if creativeArray is an array of creative_type which is a struct - then temp cannot be an integer. See below
for (i = 0; i < length-1; i++)
{
smallest = i;
for (location = i +1; location < length; location++)
{
if (creativeArray[location] < creativeArray[smallest])
smallest = location;
temp = creativeArray[smallest]; //see note above
creativeArray[smallest] = creativeArray[i] //There is a semicolon missing here...
creativeArray[i] = temp; //see note above.
}
}
}