void printVector(vector<int> &data){
for(auto i : data){
cout<< i << " ";
}
cout<<endl;
}
int main(){
std::vector<int> data {0,1,2,3,4,5,6,7,8,9};
vector<int> result;
result.resize(data.size());
transform(data.begin(),data.end(),result,bind(std::pow,_1,2));
return 0;
}
The error thrown is:
stlalgo.cpp:22:61: error: no matching function for call to ‘bind(<unresolved overloaded function type>, const std::_Placeholder<1>&, int)’
How do i hint which overloaded function needs to be used in bind?
Cheers!