const int Size=100; std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dis(0, 1000); int main() { list<double>a(Size); iota(a.begin(), a.end(), 2); shuffle(a.begin(),a.end(),dis(gen)); } Error: error: no match for 'operator+' (operand types are 'std::_List_iterator<double>' and 'int')