I have an the error "cannot have a cv qualifier" for the function indice_max and I don't understand why, I don't modify at any time the vector v
#include <iostream>
#include <vector>
#include <algorithm>
using std::vector;
int indice_max(const vector<double> & v) const{
int indice =0;
double max = v[0];
for(int i=0; i<v.size(); i++){
if(v[i]>max){
max = v[i];
indice = i;
}
}
return indice;
}