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
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 which is uninitialized.
oh i see, so maybe hand1.size() - j for q
it compiles and runs now thank you, however it doesnt recognise runs still