Hi I am supposed to write that implements a simple version of the BucketSort algorithm the only problem is I have no clue what that is. Any tips and examples on this would be awesome Thanks

I made this program but I was then told that the function prototype can only have one argument and the program that i made has three arguments can someone tell me how to make it so it will with only one argument?

#include <stdio.h>
void bucketSort(int birthYears[],int n, int max)
{
int* sort = new int[max];
int SIZE = n;
for(int j = 0 ; j <= max ; j++)
{
sort[j] = 0;
}
for(int i = 0 ; i < SIZE ; i++)
{
++sort[birthYears[i]];
}
for(int i = 0 , j = 0 ; j <= max ; ++j)
{
for(int k = sort[j] ; k > 0 ; k--)
{
birthYears[i++] = j;
}
}
for(int i = 0 ; i < SIZE ; i++)
{
printf("%d ",birthYears[i]);
}
printf("\n");
}
int main()
{
int birthYears[] = {84, 51, 92, 72, 17, 62, 1, 16, 10, 28, 99, 71, 45, 18, 61};
int elem = sizeof(birthYears)/sizeof(int);
int max = birthYears[0];
for(int i = 0 ; i < elem ; i++)
if(birthYears[i] > max)
max = birthYears[i];
bucketSort(birthYears, elem, max);
getchar();
return 0;
}

Are you allowed to use a vector? If so you just pass in the vector and you'll have the count and you can find the max in the bucketSort function itself.
Even if you can't use the vector (noting your use of printf might lead me to believe that you were trying to make a C program compiled under C++) you can still calculate max within your bucketSort function.
Failing all that you can probably tack your n onto the end of your array and just make sure you avoid it in the loops, but that could be confusing for you and inviting trouble.

How can I make this to continue until the user presses N? I've tried using while(1), while( option == 'y' || option == 'Y') but it kept giving an error ...