Guest_imported
New member
- Jan 1, 1970
- 0
HI
I am new, (no prizes for guessing)
If I have a 2 dimentional array say 10 X 10
and I pick 2 cordinates row and column
and I want the user to guess my choice eg
hit = table[1][7];
by inputting the row and column - but I want to be able to give them a clue each time tey get it wrong
either up, down, left, right, up-left, up-right, down-left
down-right
what I would like any suggestions on a code efficient way of checking the users input against and displaying the correct message
I have coded the program and it works fine but it is several lines long and includesabout 10 if statements
I havn't used pointers as I am only just beginng to figure out what they do but would also like suggestions as to how they would perhaps make the coding beter
Many Thanks
I am new, (no prizes for guessing)
If I have a 2 dimentional array say 10 X 10
and I pick 2 cordinates row and column
and I want the user to guess my choice eg
hit = table[1][7];
by inputting the row and column - but I want to be able to give them a clue each time tey get it wrong
either up, down, left, right, up-left, up-right, down-left
down-right
what I would like any suggestions on a code efficient way of checking the users input against and displaying the correct message
I have coded the program and it works fine but it is several lines long and includesabout 10 if statements
I havn't used pointers as I am only just beginng to figure out what they do but would also like suggestions as to how they would perhaps make the coding beter
Many Thanks