Syntax Passing and Array into a function as reference
in
Programming Questions
•
6 months ago
Hi There,
I am writing a function which reads a 2D int array, and outputs a trasformed value to a new similar dimension array. My problem is how do I pass the 2nd array (below) such that it returns the values.
This is an extract.
The two Arrays are defined as
final int TANK_LENGTH = 17; //Tank Row
final int TANK_WIDTH = 9; //Tank Col
int[][] cctank = new int[TANK_LENGTH][TANK_WIDTH]; // tank with binary image
int[][] pxtank = new int[TANK_LENGTH][TANK_WIDTH]; // tank with sorted blobs
In program they are called as
LabelPoints(cctank,pxtank);
in function they are defined as :
void LabelPoints(int[][] InputArray, int[][]OutputArray) {....................code of function..........}
Is all passing in Processing as reference ?.
1