Hi, i'm trying to access a list directly by using [position] on the listname.
Here is the code:
Code:typedef struct { double dx; double dy; int ic; } t_fingertip; typedef struct{ double dd; int ic; int ix; int iy; }t_knnclassify; typedef struct{ int ix; int iy; int ic; } t_knnclassified; typedef list<t_knnclassify> CLASSIFYLIST; typedef list <t_knnclassified> CLASSIFIEDFLIST; typedef list<t_fingertip> FINGERLIST; CLASSIFIEDFLIST final; //filled final with some elements //create an element with data from final-list for the flists (of type FINGERLIST) //ipos is var given by methoddeclaration t_fingertip ftx = {(int)final[ipos].ix, (int)final[ipos].iy, (int)final[ipos].ic}; //Adding to list ptLocalVars->flists->push_back(ftx);
When i try to compile it i get this error:
fingerClassifier.cc:809: no match for `CLASSIFIEDFLIST &[int &]'
fingerClassifier.cc:809: no match for `CLASSIFIEDFLIST &[int &]'
fingerClassifier.cc:809: no match for `CLASSIFIEDFLIST &[int &]'
Anybody knows how to fix it?
Thanks in advance!
~jan



LinkBack URL
About LinkBacks


