title: VC++ Error - syntax error : 'constant' on a enum
body: <p>I am using a source code for stereo vision and it gives  an error </p>
  
  <pre><code>1&gt;  StereoMain.cpp
  1&gt;c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C2059: syntax error : 'constant'
  1&gt;c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C3805: 'constant': unexpected token, expected either '}' or a ','
  1&gt;  StereoGrabber.cpp
  1&gt;c:\opencv2.2\include\opencv2\flann\logger.h(66): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  1&gt;          e:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
  1&gt;c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C2059: syntax error : 'constant'
  1&gt;c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C3805: 'constant': unexpected token, expected either '}' or a ','
  1&gt;  StereoFunctions.cpp
  1&gt;c:\opencv2.2\include\opencv2\flann\logger.h(66): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  1&gt;          e:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
  1&gt;c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C2059: syntax error : 'constant'
  1&gt;c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C3805: 'constant': unexpected token, expected either '}' or a ','
  1&gt;c:\documents and settings\giga\desktop\vision\source 
  </code></pre>
  
  <p>Source code </p>
  
  <pre><code>CVAPI(int) cvCreateTrackbar2( const char* trackbar_name, const char* window_name,
                                int* value, int count, CvTrackbarCallback2 on_change,
                                void* userdata CV_DEFAULT(0));
  
  /* retrieve or set trackbar position */
  CVAPI(int) cvGetTrackbarPos( const char* trackbar_name, const char* window_name );
  CVAPI(void) cvSetTrackbarPos( const char* trackbar_name, const char* window_name, int pos );
  
  enum
  {
      CV_EVENT_MOUSEMOVE      =0,
      CV_EVENT_LBUTTONDOWN    =1,
      CV_EVENT_RBUTTONDOWN    =2,
      CV_EVENT_MBUTTONDOWN    =3,
      CV_EVENT_LBUTTONUP      =4,
      CV_EVENT_RBUTTONUP      =5,
      CV_EVENT_MBUTTONUP      =6,
      CV_EVENT_LBUTTONDBLCLK  =7,
      CV_EVENT_RBUTTONDBLCLK  =8,
      CV_EVENT_MBUTTONDBLCLK  =9
  };
  
  enum
  {
      CV_EVENT_FLAG_LBUTTON   =1,
      CV_EVENT_FLAG_RBUTTON   =2,
      CV_EVENT_FLAG_MBUTTON   =4,
      CV_EVENT_FLAG_CTRLKEY   =8,
      CV_EVENT_FLAG_SHIFTKEY  =16,
      CV_EVENT_FLAG_ALTKEY    =32
  };
  
  typedef void (CV_CDECL *CvMouseCallback )(int event, int x, int y, int flags, void* param);
  
  /* assign callback for mouse events */
  CVAPI(void) cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse,
                                  void* param CV_DEFAULT(NULL));
  </code></pre>
  
  <p>Thank you
  <a href="http://pastebin.com/dpbCxLgK" rel="nofollow">http://pastebin.com/dpbCxLgK</a></p>