我收到此错误error C2440: '=' : cannot convert from 'void *' to 'TrackedObj *'
我的 TrackedObj 结构如下所示:
typedef struct {
IplImage* hsv;
IplImage* hue;
IplImage* mask;
IplImage* prob;
CvHistogram* hist;
CvRect prev_rect;
CvBox2D curr_box;
} TrackedObj;
我的代码:
TrackedObj *obj ;
obj = malloc(sizeof *obj) ;