//arr is the array
int length;//for recive the array size
length=sizeof(arr);//recive the array size
cout <<length;
length=length/sizeof(typeid(arr));//calculate the number of elements
cout << sizeof(typeid(arr));
i'm using these code for calculate the number of elements in array.
sizeof(typeid(arr)) these line is for give the type size, but isn't correct
can anyone advice me?