+ 2

Can you insert values to your arrays by using functions

30th Mar 2017, 1:11 PM
Yusuf
Yusuf - avatar
4 Answers
+ 4
sure. you need to send the array parameter as reference (int (&arr) []) or pointer (to the array int** or int*[])
30th Mar 2017, 1:32 PM
anon
anon - avatar
+ 16
Yes.
30th Mar 2017, 2:52 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
Arrays in c++ are pass-by-reference so app you need to do it pass in readArray(int array[]); And if you have a 2-D array you need to include the number in the column or second bracket for it to work.
30th Mar 2017, 2:00 PM
Ryan
+ 1
yes
18th Apr 2017, 6:42 PM
Dimon Luchin
Dimon Luchin - avatar