Error C3374: can't take address of 'ProjectName::on_mouse' unless creating delegate instance
I am working on openCV camShift color detection algorithm. When I am trying to call
cvSetMouseCallback( "CamShiftDemo",&ProjectName::on_mou开发者_如何学JAVAse,0);
function within the main method this gives me above mentiond C3374 Error in VC++.
this is the on_mouse function that I am using
static void on_mouse( int event, int x, int y, int flags,void* param )
{
//function implementation
}
I can't figure out what is the exact problem here.some forums say that, this is because of managed and unmanaged C++ codes. Can any one help me to get rid of this problem? Please share me a sample code to sort out this problem.
Assign it to appropriate delegate, rather than directly assigning it to some function-pointer.
http://msdn.microsoft.com/en-us/library/5408cs95(v=vs.80).aspx
精彩评论