title: C++ array and find functions
body: <p>I am writing a lexer and I am using an array to strore the keywords and reserved words:</p>
  
  <pre><code>string keywords[20] = {
  
    "function",
    "if",
    "while",
    "halt",
  };
  </code></pre>
  
  <p>I am trying to use :</p>
  
  <pre><code>bool isKeyword(string s)
  {
    return find( keywords.begin(), keywords.end(), s ) != keywords.end();
  }
  </code></pre>
  
  <p>but I am getting the error: "error: request for member 'end' in 'keywords', which is of non-class type 'std::string [20] {aka std::basic_string [20]}"</p>