问题
I'm using a CvSeq of Cvpoint and it is created by cvApproxPoly. I need to delete some points and insert some new ones. I can delete the points with any problem, but when I try to insert I get an error: "cannot convert parameter 3 from "CvPoint" to "const void *"
the code I wrote is
Cvpoint p;
p.x=1;
p.y=1;
cvInsert (mySeq, i, p);
how do I typecast p?
回答1:
try cvSeqPush
call it as
Cvpoint p;
p.x=1;
p.y=1;
cvSeqPush(mySeq, &p);
来源:https://stackoverflow.com/questions/8312102/how-to-insert-a-cvpoint-into-a-cvseq-with-cvinsert