0
Different methods of passing array as arguments?
4 Respuestas
+ 3
void pass(int *arr,int len){
}
void pass(int arr[],int len){
}
0
can you give a example of a program
0
sorry an example for it
0
template <int SIZE>
void f(int (&arr)[SIZE]) {
cout << arr[0];
cout << SIZE;
}
int main() {
int arr[] = {1,1,1};
f(arr); // prints 13
return 0;
}