void MySort (product data) { char key; string want; cout<< "want"<< endl; cin>> want; cout<< "key: (A)scending/(D)escending"<< endl; cin>> key; if(key=='A' || key=='a') { if(want=="price") sort(data.price.begin(), data.price.end(), compareFa()); }; if(key=='D' || key=='d') { if(want=="price") sort(data.price.begin(), data.price.end(), compareFd()); }; }
czemu wywala błąd przy Begin() i end()?
error request for member 'begin' in 'data.product::price' , which is of non-class type 'float'
error request for member 'end' in 'data.product::price' , which is of non-class type 'float'