+ 2
Can we use an array as a parameter of a function?
3 ответов
+ 5
hello,
Take a look at this. It describes in depth.
https://www.tutorialspoint.com/cplusplus/cpp_passing_arrays_to_functions.htm
+ 3
ok thanks.. got it
+ 2
Yes, you can but like
void myfunc(int a[],int something)
{
//your code goes here
}
and your calling that function like this
int b={1,4,2,7};
myfunc(b,b.size());