Thread: [c++] array
View Single Post
Old 11-18-2004, 02:15 PM   #2 (permalink)
pixelbend
Too hot in the hot tub!
 
pixelbend's Avatar
 
how does it not work? does it break on compile? where does it break?

Looks to me like your numbers are going into the array correctly but your comarison is off.
You need to compare 012 then 023 then 034 then 123 then 134, etc.
Probably need a nested for loop for that.

for (int i = 0; i <= 2; i++){
for (int k = 1; k <= 3; k++){
...etc...
__________________
But I don't want ANY Spam!

Last edited by pixelbend; 11-18-2004 at 02:23 PM..
pixelbend is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62