Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

vector<DMatch>* matches never gets initialized, that's your problem here.

so matches->push_back(_m) will crash, as well as all further usage of matches

well, you could initialize it properly:

vector<DMatch>* matches = new vector<DMatch>;

but, why a pointer in the first place ?

i'd use vector<DMatch> matches , matches.push_back(_m) , and matches.size() instead