* I meant pointer parameters
This function that has two parameters, both of type reference and return reference to pointer.
Do I need to fix anything?
I have been stumped for days and dunno what I should fix
here is my code:
#include <iostream>
using namespace std;
double *ComputeMaximum( const double *num1a, const double *num2a);
int main()
{
double num1;
double num2;
cout << "Please enter two numbers: ";
cin >> num1 >> num2;
cout << "The greatest value is: " << ComputeMaximum(num1, num2) << " and its pointer is: " << *ComputeMaximum(num1, num2);
return 0;
}
double *ComputeMaximum( const double *num1a, const double *num2a)
{
return (double *)(num1a > num2a ? num1a : num2a);
}