title: Using c++ to solve wordsearch.
body: <p>Sorry to bother everyone with a simple question but I'm very new at C++ and i don't know what to do. So I've been given a framework in C++ that reads in 2 txt files containing a wordsearch and a list of words to be found and present the results in another txt file. 
  I'm trying to complete the framework but I cant figure out how exactly the program will check all 8 directions or how a system will compare the words in the dictionary file with the wordsearch and put any matched words into the results.txt file. I've attached the framework below and any info or advice on how to get started would be deeply appreciated.</p>
  
  <pre><code>dictionary.txt 
  ABSEIL
  BIKE
  PIXEL
  RESIGHTS
  YARDWORKS
  
  wordsearch.txt 
  S T H G I S E R B
  G K L L B X D I E
  K P R H I M K L D
  T G Y O L E X I P
  B A P T W H T E J
  T Q U D X D W S F
  V M V S H L R B A
  H Q L B C K S A Y
  R D G B F J P Q Y
  
  
  Wordsearch.h 
  #pragma once
  
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;Windows.h&gt;
  
  using namespace std;
  
  class WordSearch
  {
   public:
  WordSearch();
  ~WordSearch();
  
  bool ReadPuzzle();
  bool ReadDictionary();
  bool SolvePuzzleWithDictionary();
  
  void WriteResults(string fileName);
  
  private:
  LARGE_INTEGER start, end, frequency;
  const int NUMBER_OF_RUNS;
  const string PUZZLE_NAME;
  const string DICTIONARY_NAME;
  };
  
  
  Wordsearch.cpp 
   #include "WordSearch.h"
   #include &lt;algorithm&gt;
   #include &lt;iterator&gt;
   #include &lt;iostream&gt;
   #include &lt;iomanip&gt;
  
  using namespace std;
  
  WordSearch::WordSearch() : NUMBER_OF_RUNS(500), PUZZLE_NAME("wordsearch_grid.txt"), DICTIONARY_NAME("dictionary.txt")
  {
  }
  
  WordSearch::~WordSearch()
  {
  }
  
  bool WordSearch::ReadPuzzle()
  {
  cout &lt;&lt; endl &lt;&lt; "ReadPuzzle() has NOT been implemented" &lt;&lt; endl;
  return true;
  }
  
  bool WordSearch::ReadDictionary()
  {
  cout &lt;&lt; endl &lt;&lt; "ReadDictionary() has NOT been implemented" &lt;&lt; endl;
  return true;
  }
  
  bool WordSearch::SolvePuzzleWithDictionary() {
  cout &lt;&lt; endl &lt;&lt; "SolvePuzzleWithDictionary() has NOT been implemented" &lt;&lt; endl;
  double timeTakenInSeconds;
  QueryPerformanceFrequency(&amp;frequency);
  QueryPerformanceCounter(&amp;start);
  
  for (int n = 0; n &lt; NUMBER_OF_RUNS; ++n) {
      // Add solving code here!
  }
  
  QueryPerformanceCounter(&amp;end);
  timeTakenInSeconds = (end.QuadPart - start.QuadPart) / (double)(frequency.QuadPart*NUMBER_OF_RUNS);
  
  cout &lt;&lt; fixed &lt;&lt; setprecision(10) &lt;&lt; "SolvePuzzleWithDictionary() - " &lt;&lt; timeTakenInSeconds &lt;&lt; " seconds" &lt;&lt; endl;
  return false;
  }
  
  void WordSearch::WriteResults(string fileName) {
  cout &lt;&lt; "WriteResults() has NOT been implemented" &lt;&lt; endl;
  }
  </code></pre>