Question: Help!!! I am getting this error. How do I fix it that the arraypointer stores the values. Error:Non-const lvalue reference to type 'double' cannot bind
Help!!!
I am getting this error. How do I fix it that the arraypointer stores the values. Error:Non-const lvalue reference to type 'double' cannot bind to a value of unrelated type 'int'. H
//function for setter. This function returns a reference to the element in the array indexed by the subscript
template
V& MyStaticArray
{
if (index < 0 || index >= arraySize)
IndexError();
arrayPointer[index];
return arrayPointer[index]; //Error:Non-const lvalue reference to type 'double' cannot bind to a value of unrelated type 'int'
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
