A
ajikoe
Hello I have this code:
void sizeArr(float a[]){
cout << sizeof(a) << endl;
}
void test(void){
float val[] = {1, 2, 0.1};
sizeArr(val); // return 4
cout << sizeof(val) << endl // return 12
I don't understand ???
The idea is that I would like to calculate size of array.
Thanks in advance,
pujo
void sizeArr(float a[]){
cout << sizeof(a) << endl;
}
void test(void){
float val[] = {1, 2, 0.1};
sizeArr(val); // return 4
cout << sizeof(val) << endl // return 12
I don't understand ???
The idea is that I would like to calculate size of array.
Thanks in advance,
pujo