Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania bez odpowiedzi
Viewing all articles
Browse latest Browse all 21942

wektor_s_t_r_u_k_t_u_r

$
0
0
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'


Viewing all articles
Browse latest Browse all 21942