1. ## Word meaning

What does this line translate into english. Its part of a do while loop.Ok let me rephrase the question how to write the stuff after while in such a way that the do loop keeps repeating if
r1=0 and r2=0
or
r1=0 and r2=1
or
r1=1 and r2=0
or
(*hero)[r1][r2].gold=='G'
Code:
`}while((r1==0 && r2==0)||(r1==0 && r2==1)||(r1==1 && r2==0)||((*hero)[r1][r2].gold=='G'));`

2. It looks like you succeeded in doing what you were asking about.

3. C:
Code:
`}while((r1==0 && r2==0)||(r1==0 && r2==1)||(r1==1 && r2==0)||((*hero)[r1][r2].gold=='G'));`

English:
repeat the above commands so long as either of the following conditions are true:
1. (r1, r2) contain any of the following combinations:
a. (0, 0)
b. (0, 1)
c. (1, 0)
2. the 'gold' member of (*hero)[r1][r2] has the value 'G'

4. In number 1, you're omitting r0. What Burns11 posted the first time is correct.

5. Eh, I think c99tutorial just quoted the code posted in post #1 verbatim. The thing is, that code appears to correspond exactly to the requirements, so I don't see a problem. All c99tutorial did was rephrase what it does, but there are so many different ways of rephrasing that so I'm not sure what's the point.

6. Rephrasing could help to discover a clearer way to write something or find bugs. For example, in the context of the program, what is special about the combinations (0,0), (0,1) and (1,0)? If they are given special meaning and/or are used elsewhere in the program for some notion like "Heros in this team have deposited money in the bank" then it might help to document this somewhere or to give first-class status to such a notion with a separate function like hascredit(r1, r2).

7. Originally Posted by c99tutorial
Rephrasing could help to discover a clearer way to write something or find bugs.
Sure, if you are rephrasing to fit the context of the purpose of the code. In this case, there is no context, beyond the hint of "hero" and "gold".