Hi i'm making a function that will return make a series of strings and perform a function returning a value for each. I've stored the strings in one vector v, and the integer values in another v2. Then it is supposed to return the string that corresponds to the smallest value in v2. I'm trying to pushback the vector for each time the for loop is run, but I get an error saying there is no such function "push_back" to call. What am I doing wrong here? I'm compiling on quincy by the way.
Thanks for the help!
string mutated_chooser(string origmutated,string orisentance, int offspringnumber,int rate){
std::vector <string> v;
std::vector <int> v2;
for (int t=0; t=offspringnumber-1;t++){
v.push_back(1);
v2.push_back(1);
string newmutated= mutatedstring(origmutated,rate);
v[t]=newmutated;
int matchnumber= match(orisentance,newmutated);
v2[t]=matchnumber;}
int min_index=min_element( v2.begin(), v2.end() ) - v2.begin();
string closest =v[min_index];
return v[min_index];
}