I got an error:
-Functions that differ only in their return type cannnot be overload (#8)
-Implicit conversion loses integer precision: "time_t'(aka "lomg") to unsigned int (#14)
-Implicit cnversion loses integer precision: long to int (#18)
-Functions that differ only in their return type cannnot be overload (#24)
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void printEachIteration(int* , int );
void selectionSort(int* , int );
int random();
int main ()
{
const int ArraySize = 100;
int array[ArraySize];
srand(time(NULL));
for (int i = 0; i < ArraySize + 1;i++)
{
array[i] = random();
}
selectionSort(array, ArraySize);
return 0;
}
int random()
{
return ((rand() % 100));
}