Homework/HW01/MyArray.cc
void MyArray::input()
{
    //Some variables to facilitate using the hardenedInput function.
    int tempSize = 0, tempElement = 0;
    bool messageOnError = true;
    char message[] = "Invalid input.  Please try again: ";

    //Get the desired size of the array.
    cout << "Please enter the desired size of the array: ";
    hardenedInput(tempSize, messageOnError, message);
    resize(tempSize);

    //Cycle through the array, asking for the elements.
    for (int i = 0; i < size; ++i)
    {
        cout << "Please enter element " << i + 1 << " of " << size << ": ";
        hardenedInput(tempElement, messageOnError, message);
        array[i] = tempElement;
    }
}
/****************************** input **************************************************************
Action:         Inputs the elements of the array from the console.  This function first asks the
                user for the desired size of the array, then asks the user to input the elements.

Parameters:
IN:             None
OUT:            None

Returns:        Nothing

Precondition:   None
***************************************************************************************************/
input
Action:         Inputs the elements of the array from the console.  This function first asks the
user for the desired size of the array, then asks the user to input the elements.

None
OUT:            None

Nothing

None
input Action : Inputs the elements of the array from the console . This function first asks the user for the desired size of the array then asks the user to input the elements . None OUT : None Nothing None
void MyArray::input()
{
    int tempSize = 0, tempElement = 0;
    bool messageOnError = true;
    char message[] = "Invalid input.  Please try again: ";
    cout << "Please enter the desired size of the array: ";
    hardenedInput(tempSize, messageOnError, message);
    resize(tempSize);
    for (int i = 0; i < size; ++i)
    {
        cout << "Please enter element " << i + 1 << " of " << size << ": ";
        hardenedInput(tempElement, messageOnError, message);
        array[i] = tempElement;
    }
}
void MyArray :: input ( ) { int tempSize = 0 , tempElement = 0 ; bool messageOnError = true ; char message [ ] = " " ; cout << " " ; hardenedInput ( tempSize , messageOnError , message ) ; resize ( tempSize ) ; for ( int i = 0 ; i < size ; ++ i ) { cout << " " << i + 1 << " " << size << " " ; hardenedInput ( tempElement , messageOnError , message ) ; array [ i ] = tempElement ; } }
input
Action:         Inputs the elements of the array from the console.
input Action : Inputs the elements of the array from the console .
//Some variables to facilitate using the hardenedInput function. //Get the desired size of the array. //Cycle through the array, asking for the elements.