void busqueda_lin2(const vector<int> &v, int x,int &i,bool &b)
{
int tam = v.size();
int i =0;
bool b = false;
while (i<tam and not b) {
if (v[i]==x) b=true;
else i++;
}
}
Compiling error:
declaration of 'int &i' shadows a parameter
declaration of 'bool &b' shadows a parameter
Why???