title: Undeclared identifier error
body: <p>I wrote this code for face detection on a thread, then I will write for eyes, nose, and mouth. <p>But there is a mistake which is --- <code>'threadface_func' : undeclared identifier</code> --- <p> I can't find what it is. </p>
  
  <pre><code>    #include &lt;iostream&gt;
      #include "cv.h"
      #include "highgui.h"
      #include &lt;pthread.h&gt;
  
      typedef struct parameter_t{
          CvSeq * detectRect_face;
          IplImage* capturedImg;
          CvHaarClassifierCascade * pCascade_face;
          CvMemStorage * storage;
  
  
      }parameter_t;
  
      int main ( int argc, const char* argv[] )
      {
              CvCapture* capture = cvCaptureFromCAM(0);
              IplImage* capturedImg;
              int resCount = 1;
              char path[50];
              int flags = CV_HAAR_FIND_BIGGEST_OBJECT | CV_HAAR_DO_ROUGH_SEARCH;
  
              CvHaarClassifierCascade * pCascade_face;
              pthread_t threadface;
  
  
              pCascade_face = (CvHaarClassifierCascade *)cvLoad("C:/Users/Furkan/Desktop/Computer Vision/Programlar/opencv/data/haarcascades/haarcascade_frontalface_alt.xml");
              cvNamedWindow("FaceDetection");
  
              while (true)
              {
                  CvMemStorage * storage;
                  CvSeq * detectRect_face;
                  capturedImg = cvQueryFrame(capture);
                  storage = cvCreateMemStorage(0);
  
                  parameter_t my_parameters;
  
                  int k=pthread_create(&amp;threadface,0,threadface_func,(void*)&amp;my_parameters);
  
                  if(k!=0)
                  {
                      printf("Create thread failed! error");
                      return 1;
                  }
  
  
                  cvShowImage("FaceDetection", capturedImg);
  
                  int ch = cvWaitKey(1);
  
                  if(ch==27)
                      break;
                  else 
                      if(ch == 115)
                      {
                          sprintf(path,"d:/resim%d.bmp",resCount++);
                          cvSaveImage(path,capturedImg,0);
                      }
              }
  
          cvDestroyWindow("FaceDetection");
  
          cvReleaseCapture(&amp;capture);
  
          return 0;
      }
  
  
      void* threadface_func(void* parameter){
  
  
          parameter_t *p =(parameter_t*)parameter;
  
          p-&gt;detectRect_face=cvHaarDetectObjects(p-&gt;capturedImg,p-&gt;pCascade_face,p-&gt;storage,1.15, 3, 0,cvSize(25, 15));
  
          for(int i=0;i&lt;(p-&gt;detectRect_face ? p-&gt;detectRect_face-&gt;total:0); i++ )
              {
                  CvRect* r = (CvRect*)cvGetSeqElem(p-&gt;detectRect_face, i); 
                  CvPoint pt1 = { r-&gt;x, r-&gt;y }; 
                  CvPoint pt2 = { r-&gt;x + r-&gt;width, r-&gt;y + r-&gt;height }; 
                  cvRectangle(p-&gt;capturedImg, pt1, pt2, CV_RGB(255,0,0), 1,8, 0); 
  
              }
  
          return 0;
      }
  </code></pre>
  
  <p>Please help...</p>