Searching and storing matched words from a Database


I need help in making algorithm that will take 3 letters in a straight line from the 2d array and then search the string database whether that word exists or not, and so on with all the possible lines, i.e the array should be checked horizontaly, vertically etc .
the array can be of any size.
5x5 4x4 etc

p.s:
my database is like this
 
string database[]={"AXE","BOX","CAT}; 

closed account (48T7M4Gy)
Well the idea would be to:
- go to each cell of the array
- get the three character string in each of the 8 (?) directions
- compare each of those against the list of words

You will possibly need to be able to set up the grid, and setup the word list as well by the sound of it.
Topic archived. No new replies allowed.