hey
i was learning some new things, and found a problem with reference, google didnt help :/
here is a simple function
void pushtovector(string pushit, vector<string>&vct[],int indx){
vct[indx].push_back(pushit);
}
and a function call:
pushtovector(s,minxmax,siz(s));
what should i do to make it work? have no idea
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
those version works, so it confused me..
vector<string>vct | without table in it, with reference, works:
void pushtovector(string pushit, vector<string>&vct,int indx){
vct.push_back(pushit);
}
vector<string>vct[100] | with table in it, but with no reference, also works:
void pushtovector(string pushit, vector<string>vct[],int indx){
vct[indx].push_back(pushit);
}
but combination both of vector <string>[] and reference end up with compile error..
first post ever so it isnt that transparent :v