Hi experts
I am having an array defined as follows:
Int_t number[10];
Are there inbuilt function of getting properties of number[10] like length and sum all the entries, thanks
Hi experts
I am having an array defined as follows:
Int_t number[10];
Are there inbuilt function of getting properties of number[10] like length and sum all the entries, thanks
Hi,
int arr[10];
std::cout << sizeof(arr)/sizeof(int) << std::endl;
but really my advice would be to use classes like vector or array:
std::vector<int> v {1,2,3}
v.size()
std::array<int,3> a {1,2,3}
a.size()
D