Sunday, 15 September 2013

Processing 2d array outputting garbage -



Processing 2d array outputting garbage -

i'm trying create 10 x 10 array of 0s in processing. when run code, [[i@1335f392 output. doing wrong?

int[][] myarray; void setup() { myarray = new int[10][10]; (int = 0; < 10; i++) { (int j = 0; j < 10; j++) { myarray[i][j] = 0; } } println(myarray); } void draw() { }

you printing address of array. in order print contents, have loop on array (like did when assigning values).

arrays processing

No comments:

Post a Comment