I am new to coding and I have a double arr[]={1,2,-1.75,6};
I have tried to do
#include <iostream>
#include <math.h>
using namespace std;
void solve (double arr[]){
int size=(sizeof(arr))/(sizeof(arr[0]));
cout <<"size: "<<size <<endl;
return;
}
int main(){
double arr[]={1,2,0.75,4};
solve(arr);
return 0;
}
but I cannot find the size of array with type double. Any help is appreciated thanks!