Firstly, great tutorials. I have been trying to make a break into C++ programming for a while, but couldn't make the intellectual leap from my old (very old) Sinclair Spectrum Basic programming to C++. Very impressed.
Ok, what I am trying to map out is how I would resolve the following quandry. Currently, I have no code written, and am trying to understand the process of what needs to happen before I get in there with my coding chainsaw.
What I need to do is make a dice rolling program with a difference. Let's call the two sides A and B. The Dice themselves can be 6, 8, 10 or 12 sided, and there can be between 3 and 5 dice rolled, depending on defined starting criteria (I have that part worked out, I think). The issue I am having is how to have the code then sort the results, highest A roll vs highest B roll. 2nd highest A roll vs 2nd highest B roll, etc.
If, as an example, A rolls 3 10 7 6 and B rolls 8 1 6 8 4, I would want the code to compare A's 10 with B's 8, then A's 7 with B's 8, then A's 6 with B's 6....etc.
This is for a board game that I play, and writing a battle resolution program seems like a good idea
I'm not asking for the code, as there is an intellectual challenge in writing it, but I really need help in formulating how I would attack getting the code to sort the rolls into highest-to-lowest so that I can compare them, presumably by assigning the results as variables that I can directly compare with (if).
Thanks in advance, folks.