title: regex undeclared (Dev C++)
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;regex.h&gt;
  
  using namespace std;
  
  string input;
  
  int main()
  {   
      //Input .ply file
      ifstream inputFile ("input.ply");
  
  
      //input file is read
      if (inputFile.is_open())
      {
          int i = 1;  //Line iterator
          int vertices = 0;
          int faces = 0;
  
          vector&lt;float&gt; anatomy;
          vector&lt;float&gt; normals;
          vector&lt;int&gt; triangles;
  
          string a,line;
          getline(cin,line);
  
          while (inputFile.good())
          {
              //Take number from line 4, set as variable "vertices"
              if (i == 4)
              {
                  regex pattern("[^0-9]+");
                  getline (inputFile,line);              
                  vertices = show_match(line, pattern);
              }
  
              //Take number from line 11, set as variable "triangles"
              if (i == 11)
              {
                  regex pattern("[^0-9]+");
                  getline (inputFile,line);              
                  faces = show_match(line, pattern);
              }
  
              if (i == 13)
              {
                  i++;
                  break;
              }
  
              i++;
  
          }
  
          waitKey(0);
  }
  
  else
  {
      cout &lt;&lt; "Cannot read mesh, please try again." &lt;&lt; endl;
  }
  
  return 0;
  
  }
  </code></pre>
  
  <p>Just trying to read from a string and extract the integer, so I have added the regex header and other files in order to use regular expressions. I'm using Dev-C++ and have extracted the files for regex into their respective <em>lib</em>, <em>bin</em> and <em>include</em> folders in "<em>C:\Dev-Cpp</em>", but I am still receiving the following error when I attempt to compile my program:</p>
  
  <blockquote>
    <p>'regex' undeclared (first use this function)</p>
  </blockquote>