Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Read a 2d array into a method?  RSS feed

 
Travis Gn
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to check for Reflexive, Symmertric, and Antisymmetric of a double array. i.e.
1 0 1
0 1 0
1 0 1
I created the the above array and tried to read it into a method:

I know I am missing something easy.
Thanks for the help!
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Try changing your method signature to reflect the array size:

Hope that helps.
 
Travis Gn
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried that, didn't work.
am I calling it right?
 
Rocky Summers
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think to accept a 2D array, you should go like this:
 
chi Lin
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you define array like

you should just use reflexive(array);
[ November 25, 2003: Message edited by: chi Lin ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!