• Post Reply Bookmark Topic Watch Topic
  • New Topic

Array copy  RSS feed

 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am copying two arrays, but the printout elements are different.

Thanks
 
sathish kumar
Ranch Hand
Posts: 47
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a better solution for sure, but I'm curious why your code didn't do what you wanted. Any chance the numberOfCells and cellsPointerNumber don't have the values you think they do? Try just using array.length instead and see what happens.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!