I keep getting this error...
lab11a.cpp: In function ‘int main()’:
lab11a.cpp:120:34: error: no matching function for call to ‘SafeArray::GetElement(int&, double)’
lab11a.cpp:120:34: note: candidate is:
lab11a.cpp:48:6: note: bool SafeArray::GetElement(int, float&) const
lab11a.cpp:48:6: note:   no known conversion for argument 2 from ‘double’ to ‘float&’
lab11a.cpp:121:38: error: no matching function for call to ‘SafeArray::GetElement(int&, double)’
lab11a.cpp:121:38: note: candidate is:
lab11a.cpp:48:6: note: bool SafeArray::GetElement(int, float&) const
lab11a.cpp:48:6: note:   no known conversion for argument 2 from ‘double’ to ‘float&’
This is the code that I have in my interface for this method:
bool GetElement(const int i, float & Value) const;
This is the code in my implementation:
bool SafeArray::GetElement(const int i, float & Value) const 
{
    bool Success = false;
    if ((i >= 0) && (i < SIZE))
    {
        Success = true;
        Value = Array[i];
    }
    return Success;
}
This is the code in my main program:
for (int i = -5; i < 24; i++)
{
    data1.GetElement(i, i * 0.1);
    if (data1.GetElement(i, i * 0.1) == true)
        cout << "get " << i << " " << i * 0.1 << endl;
}
 
     
     
    