it keeps saying that 'error expected initializer before 'void'
how can i make it work? and how can i let it sort an array of 10 elements type integer?
#include <iostream>
using namespace std;
int main()
void selectionSort(int arr[], int n);
{
int i, j, minIndex, temp;
for (i = 0; i < n-1; j++)
if (arr[j] < arr[minIndex])
minIndex = j;
if (minIndex != i)
{temp = arr [i];
arr[i] = arr[minIndex];
arr[minIndex] = temp;
}
return 0;
}