Hey, I was just writing this program to practice functions and arrays and i was wondering if there is a class or package out there that does the same thing i have here. I am new to C++ so i dont have many good references for C++ classes and packages. And i know that i am re-inventing the wheel by writing these functions they are for my practice.

Code:
#include <iostream>
#include <iomanip>




//Function ProtoTypes.
int sumArray(int[], int);
double sumArray(double[],int);
int largest(int[],int);
int largest(double[],int);
int smallest(int[],int);
int smallest(double[],int);
double average(double[], int);
double average(int[],int);
bool isAscending(int[],int);
bool isDescending(int[],int);

int linearSearch(int[],int,int);
int linearSearch(double[],int,double);
int linearSearch(char[],int,char);
int binarySearch(int[], int , int);
int binarySearch(double[],int,double);
int binarySearch(char[],int,char);

void bubbleAscending(int[],int);
void bubbleAscending(double[],int);
void bubbleAscending(char[],int);
void bubbleDescending(int[],int);
void bubbleDescending(double[],int);
void bubbleDescending(char[],int);
void selectionAscending(int[],int);
void selectionAscending(double[],int);
void selectionAscending(char[],int);






using namespace std;



int main()
{

    //MAIN IS EMPTY ,, I took out all my testing crap.

cout <<"Waiting to Exit"<<endl;
cin.get();
return(0);
}


/**************************************************************************
**********************   BASIC OPERATIONS   *******************************
**************************************************************************/


//Returns the sum of all elements in the array.
//Accepts integer array and integer size
int sumArray(int array[], int size)
{
    int sum=0;
    for(int i=0;i<size;i++)
        sum += array[i];
        
    return(sum);
}

//Returns the sum of all elements in the array.
//Accepts double array and integer size
double sumArray(double array[], int size)
{
    double sum=0;
    for(int i=0;i<size;i++)
        sum += array[i];
        
    return(sum);      
}

//Returns the index of the largest element in the arrray
//Accepts integer array and integer size
int largest(int array[], int size)
{
    int largest=0; //Index of largest element
    
    for(int i=1;i<size;i++)
        if(array[largest] < array[i])
            largest=i;
            
    return(largest);
}


//Returns the index of the largest element in the arrray
//Accepts double array and integer size
int largest(double array[], int size)
{
    int largest=0; //Index of largest element
    
    for(int i=1;i<size;i++)
        if(array[largest] < array[i])
            largest=i;
            
    return(largest);
}


//Returns the index of the first occurance of the smallest element in the array
//Accepts integer array and integer size
int smallest(int array[], int size)
{
    int smallest=0; //Index of smallest Element
    
    for(int i=1;i<size;i++)
        if(array[smallest]>array[i])
            smallest=i;
    
    return(smallest);
}


//Returns the index of the first occurance of the smallest element in the array
//Accepts double array and integer size
int smallest(double array[], int size)
{
    int smallest=0; //Index of smallest Element
    
    for(int i=1;i<size;i++)
        if(array[smallest]>array[i])
            smallest=i;
    
    return(smallest);
}


//Returns the average of an Arrays Elements
//Accepts double array and integer size
double average(double array[], int size)
{
    double sum=0.0;
    
    for(int i=0;i<size;i++)
        sum += array[i];
    
    return(sum/size);
}

//Returns the average of an Array Elements
//Accepts integer array and integer size
double average(int array[], int size)
{
    double sum=0.0;
    
    for(int i=0;i<size;i++)
        sum += array[i];
    
    return(sum/size); 
}

//Determines if an array is sorted in Ascending order
//Accepts integer array and integer size.
//Returns true if in ascending order.
bool isAscending(int array[],int size)
{
    for(int i=0;i<size-1;i++)
        if(array[i] > array[i+1])
            return(false);
            
    return(true);   
}

//Determines if an array is sorted in Descending order
//Accepts integer array and integer size.
//Returns true if in Descending order.
bool isDescending(int array[],int size)
{
    for(int i=0;i<size-1;i++)
        if(array[i]<array[i+1])
            return(false);
            
    return(true);
}


/**************************************************************************
**************************   LINEAR SEARCH    *****************************
**************************************************************************/



//Uses a linear search on an Integer array.
//Returns the index of the element matching find argument,
//      returns -1 if element is not present.
int linearSearch(int array[], int size, int find)
{  
    for(int i=0;i<size;i++)
        if(array[i]==find)
            return(i);
    
    return(-1);
}

//Uses a linear search on a double array.
//Returns the index of the elemnt matching find argument,
//      returns -1 if element is not present.
int linearSearch(double array[], int size, double find)
{
    for(int i=0;i<size;i++)
        if(array[i]==find)
            return(i);
    
    return(-1);
}

//Uses a linear serch on a char array.
//Returns the index of the element matching find argument.
//      returns -1 if the element is not present.
int linearSearch(char array[], int size, char find)
{
    for(int i=0;i<size;i++)
        if(array[i]==find)
            return(i);
    
    return(-1);
}

/**************************************************************************
**************************   BINARY SEARCH    *****************************
**************************************************************************/

//Uses a binary search on a sorted Integer array.
//Returns the index of the element matching find argument,
//      returns -1 if element is not present.
int binarySearch(int array[], int size, int find)
{
    int first=0;          //Index for the beggining of the search portion
    int last=size-1;      //Index for the end of the search portion
    int middle;           //Index for the middle of the search portion

    //Continue untill the array has been halved down to 1 Element.
    while(first<=last)
    {
        middle=(first+last)/2;      //Determine middle position
        
        //If the middle element is the one being search for return it.
        if(find==array[middle])     
            return(middle);
        
        //The find value will be in the left half (if it exists).
        else if(array[middle]>find)    
            last= middle-1;
        //The find value will be in the right half (if it exists).
        else
            first= middle+1;
    }
    return(-1);
}

//Uses a binary search on a sorted double array.
//Returns the index of the elemnt matching find argument,
//      returns -1 if element is not present.
int binarySearch(double array[], int size, double find)
{
    int first=0;
    int last=size-1;
    int middle;

    while(first<=last)
    {
        middle=(first+last)/2;
        
        if(find==array[middle])
            return(middle);
        
        else if(array[middle]>find)
            last= middle-1;
        else
            first= middle+1;
    }
    return(-1);
}

//Uses a binary serch on a sorted char array.
//Returns the index of the element matching find argument.
//      returns -1 if the element is not present.
int binarySearch(char array[], int size, char find)
{
    int first=0;
    int last=size-1;
    int middle;

    while(first<=last)
    {
        middle=(first+last)/2;
        
        if(find==array[middle])
            return(middle);
        
        else if(array[middle]>find)
            last= middle-1;
        else
            first= middle+1;
    }
    return(-1);  
}


/**************************************************************************
*****************************   SORTING   *********************************
**************************************************************************/


//Uses a BubbleSort algorithm on an integer array to sort in Ascending order. 
//Accepts an integer array and an integer size.
//This will modify the array passed in (it will be sorted).
void bubbleAscending(int array[], int size)
{
    int temp;
    bool swapMade=true;
    
    //Continues while a swap was made in the previous itteration.
    // A complete itteration, where no swap was made, will end the loop.
    while(swapMade)                 
    {
        swapMade=false;
        for(int i=0; i<size-1 ;i++)
            if(array[i]>array[i+1])
            {
                //Swaping the contents.
                temp=array[i];
                array[i]=array[i+1];
                array[i+1]=temp;
                swapMade=true;
            }
    }
}


//Uses a BubbleSort algorithm on an double array to sort in Ascending order. 
//Accepts a double array and an integer size.
//This will modify the array passed in (it will be sorted).
void bubbleAscending(double array[], int size)
{
    double temp;
    bool swapMade=true;
    
    while(swapMade)                 
    {
        swapMade=false;
        for(int i=0; i<size-1 ;i++)
            if(array[i]>array[i+1])
            {
                temp=array[i];
                array[i]=array[i+1];
                array[i+1]=temp;
                swapMade=true;
            }
    }
}


//Uses a BubbleSort algorithm on an char array to sort in Ascending order. 
//Accepts a char array and an integer size.
//This will modify the array passed in (it will be sorted).
void bubbleAscending(char array[], int size)
{
    char temp;
    bool swapMade=true;
    
    while(swapMade)                 
    {
        swapMade=false;
        for(int i=0; i<size-1 ;i++)
            if(array[i]>array[i+1])
            {
                temp=array[i];
                array[i]=array[i+1];
                array[i+1]=temp;
                swapMade=true;
            }
    }
}


//Uses a BubbleSort algorithm on an integer array to sort in Descending order. 
//Accepts an integer array and an integer size.
//This will modify the array passed in (it will be sorted).
void bubbleDescending(int array[], int size)
{
    int temp;
    bool swapMade=true;
    
    while(swapMade)                 
    {
        swapMade=false;
        for(int i=0; i<size-1 ;i++)    
            if(array[i]<array[i+1])
            {
                swapMade=true;
                temp=array[i];
                array[i]=array[i+1];
                array[i+1]=temp;
            }
    }
}


//Uses a BubbleSort algorithm on a double array to sort in Descending order. 
//Accepts an double array and an integer size.
//This will modify the array passed in (it will be sorted).
void bubbleDescending(double array[], int size)
{
    double temp;
    bool swapMade=true;
    
    while(swapMade)                 
    {
        swapMade=false;
        for(int i=0; i<size-1 ;i++)    
            if(array[i]<array[i+1])
            {
                swapMade=true;
                temp=array[i];
                array[i]=array[i+1];
                array[i+1]=temp;
            }
    }
}


//Uses a BubbleSort algorithm on a char array to sort in Descending order. 
//Accepts an char array and an integer size.
//This will modify the array passed in (it will be sorted).
void bubbleDescending(char array[], int size)
{
    char temp;
    bool swapMade=true;
    
    while(swapMade)                 
    {
        swapMade=false;

        for(int i=0; i<size-1 ;i++)    
            if(array[i]<array[i+1])
            {
                swapMade=true;
                temp=array[i];
                array[i]=array[i+1];
                array[i+1]=temp;
            }
    }
}


//Uses a SelectionSort algorithm on an integer arry to sort in Ascending order.
//Accepts an integer array and an integer size.
//Modifys the array passed in (it will be sorted) 
void selectionAscending(int array[], int size)
{
    int start;       //Starting index of the unsorted portion.
    int smallest;    //Index of the smallest element in unsorted portion.
    int temp;        //Temporary storage for swaping.
    
    
    /*Outer loop continues untill start has moved to the next-to-last index. Once
    *    the last 2 indices have been compared no more comparisons are neccesary.
    *    The update moves the starting point of the unsorted portion and
    *    assigns the starting point as the smallest element.*/
    for(start=0,smallest=0; start<size-1 ; start++,smallest=start)
    {
        //This loop cycles through the unsorted portion looking for the smallest element
        for(int i=start+1; i<size ;i++)
            if(array[smallest] > array[i])
                smallest=i;
                
        //Moving the smallest element in the unsorted portion to the start of the
        //      unsorted portion.
        temp=array[start];
        array[start]=array[smallest];
        array[smallest]=temp;
    }
}


//Uses a SelectionSort algorithm on a double arry to sort in Ascending order.
//Accepts an double array and an integer size.
//Modifys the array passed in (it will be sorted) 
void selectionAscending(double array[], int size)
{
    int start;      
    int smallest;    
    double temp;        
    
    for(start=0,smallest=0; start<size-1 ; start++,smallest=start)
    {
        for(int i=start+1; i<size ;i++)
            if(array[smallest] > array[i])
                smallest=i;
                
        temp=array[start];
        array[start]=array[smallest];
        array[smallest]=temp;
    }
}


//Uses a SelectionSort algorithm on a char arry to sort in Ascending order.
//Accepts an char array and an integer size.
//Modifys the array passed in (it will be sorted) 
void selectionAscending(char array[], int size)
{
    int start;      
    int smallest;    
    char temp;        
    
    for(start=0,smallest=0; start<size-1 ; start++,smallest=start)
    {
        for(int i=start+1; i<size ;i++)
            if(array[smallest] > array[i])
                smallest=i;
                
        temp=array[start];
        array[start]=array[smallest];
        array[smallest]=temp;
    }
}