I'm an absolute c++ beginner so please be patient.
#include <iostream>
using namespace std;
double array_of_5[5] = {1,2,3,4,5};
double sum(double a , double b );
double a= array_of_5[2];
double b= array_of_5[2];
int main ()
{
cout<<"The sum of two members of the array is: " <<sum<< endl;
return 0;
}
double sum(double a, double b )
{
return a + b;
}
I am trying to take the second term of the array and add it with the third term of this array
but when i debug this program only some random hexadecimal numbers (I guess) come out.
Please, if you could have a look at my code and tell me where I'm mistaking?
Thank you.