I've a function which returns a struct type pointer. What I want is pFacialFeatures to point to the same address as returned pointer.
struct Features
{
CvRect* face_;
CvRect* nose_;
CvRect* eyesPair_;
CvRect* rightEye_;
CvRect* leftEye_;
CvRect* mouth_;
};
Features* Detect()
{
Features* facialFeatures = (Features*) malloc(sizeof(Features));
return facialFeatures;
}
int main(int argc, char* argv[])
{
Features* pFacialFeatures;
pFacialFeatures = Detect();
}
It gives me the error:
IntelliSense: a value of type "Features *" cannot be assigned to an entity of type "Features *"
Note: Maybe you may think this question is same with this one. In that question there's a problem with declaring struct. I declared struct truely.