So here is the function I was writing
#include <iostream>
#include <math.h>
using namespace std;
double bin2dec(int binary[], int arr_size){
int x;
double y;
int a = 0;
double result_arr[1000];
while(binary[a] == 1 || binary[a] == 0){
for(y = 0, x = 0; x <= arr_size; ++y, ++x){
double result = binary[x] * pow(2, y);
result_arr[x] = result;
}
++a;
}
return result_arr
}
What my function does is it converts binary to decimal by taking in an integer array and array size it returns a double representing the output but the problem is it says I can't convert 'double*' to 'double' error when I execute it by including it in another file.