Mar 4, 2012 at 2:57pm Mar 4, 2012 at 2:57pm UTC
they are initialized in the for loop, and they are needed due to the amount of combinations there could be
for instance, the hand could be: ace, 2, 2, 3, jack, i need it to recognise that there are two straights of 3 in that hand
Last edited on Mar 4, 2012 at 3:15pm Mar 4, 2012 at 3:15pm UTC
Mar 4, 2012 at 3:52pm Mar 4, 2012 at 3:52pm UTC
I mean hand1 at j+q doesn't exist.
For example if hand1.size() = 10,
then j goes up to 9-2 = 7, and so
does q, so you're trying to access
hand1[14] which is uninitialized.
Mar 4, 2012 at 4:10pm Mar 4, 2012 at 4:10pm UTC
oh i see, so maybe hand1.size() - j for q
Mar 4, 2012 at 5:40pm Mar 4, 2012 at 5:40pm UTC
it compiles and runs now thank you, however it doesnt recognise runs still