posted 16 years ago
Difficult to be sure without seeing the whole of the code; where can you find the Card class?
You are declaring an array of arrays (not a two-dimensional array), then you instantiate it as a 4-member array, each member being a 13-member array. Then you fill in each of the 4 arrays with Cards, using the 13 ranks. Note the ranks appear to begin at 1, and arrays begin at 0, so you have to write - 1 in the array indices. There are obviously numbers in the Card class, DIAMONDS = 1 . . . CLUBS = 4, and ACE = 1 . . . KING = 13. There are probably also arrays in the Card class whereby suits[0] = "Diamonds" and ranks[0] = "Ace".
I don't think you have a "Diamonds" row anywhere, you have an array where every member is marked as "Diamonds". Very subtle difference, but you cannot get "Diamonds" out of the 4-member array. You can get "Diamonds" out of any of the Cards in the 1st 13-member array.