title: Error C2146: syntax error : missing ')' before identifier 'and'
body: <p>I'm currently coding an app that will use OCR to read page numbers. I am using Visual Studio 2013 on a PC. I'm using C++ with OpenCV and Tesseract to complete this. </p>
  
  <p>An error keeps on coming up and while I have come across similar problems,  I can't find anything where it specific relates to the identifier 'and'. As such, I don't know how to fix this problem. Here is the section of code that it applies to:</p>
  
  <pre><code>vector&lt;string&gt; PgNrOCR::runRecognition(const vector&lt;Mat&gt; &amp;pgnrImage, int                   pgnrType)
  {
      vector&lt;string&gt; output;
  
      output.resize(pgnrImage.size());
  
      for (size_t i = 0; i &lt; pgnrImage.size(); i++)
      {
          if (!pgnrImage[i].empty() and pgnrType == 1)
              output[i] = runPrediction1(pgnrImage[i], i);
          if (!pgnrImage[i].empty() and pgnrType == 2)
              output[i] = runPrediction2(pgnrImage[i], i);
      }
      return (output);
  }
  </code></pre>
  
  <p>The 'and' identifiers in the if statement are bringing up the error, so I need to find an alternative solution. The full error appears as so. </p>
  
  <blockquote>
    <p>Error  3   error C2146: syntax error : missing ')' before identifier 'and' c:\users\andrew\documents\visual studio 2013\projects\project1\project1\pgnrocr.cpp 152 1   PgTurn</p>
  </blockquote>
  
  <p>I appreciate any help!</p>