puzzle search

So, I need to write a program that will find all of the words in a crossword, including reversed and both horizontal or vertical. (no diagonal words). I have to store the puzzle in a two-dimensional char array, and then can only process one line at a time and one column at a time. And finally, a function that determines if the string of letters is a word or not. I have a file with over 400 words in the dictionary ( 4 letters only).
here's the code to open the file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
puzzle.open("C:/Temp/word_puzzle.txt");
	if (!puzzle)
	{
		cout << "Unable to open puzzle file" << endl;
		system("pause");
		return 1;
	}
	else
	{
		cout << "Puzzle file opened" << endl;
	}

	dictionary.open("C:/Temp/dictionary_four_letter_words.txt");
	if (!dictionary)
	{
		cout << "Unable to open dictionary file" << endl;
		system("pause");
		return 1;
	}
	else
	{
		cout << "Dictionary file opened" << endl << endl;
	}

Here is the word puzzle.
pxabackegs
esorelated
vmoonkcent
zrllablead
msrkradmcf
floortjukv
strxmicedc
qutamktsud
rxquitmmuy
datasetlas
Last edited on
Topic archived. No new replies allowed.