Hi,
My aim is to make array2(actually a vector but named array2 for other reasons) equal to a rotated vector numerator.
The vector 'numerator' would normally look like this [0,5,6,8,....] but it needs to be rotated so the first non-zero term is first, so it should look like this [0,23,5,6,...] to [23,5,6.....]. The problem is that numerator vector cannot be changed(requirement), so I want to make a temporary vector named array2 equal to it.
code snippet:
size_t counter = finder(numerator); // finds the index of the first non-zero term
array2 = std::rotate(numerator.begin(), (numerator.begin() +counter), numerator.end());
This unfortunately gives an error :
Severity Code Description Project File Line Suppression State Detail Description
Error (active) E0349 no operator "=" matches these operands Polynomial Long Division operand types are: std::vector<double, std::allocator<double>> = std::_Vector_iterator<std::_Vector_val<std::conditional_t<true, std::_Simple_types<double>, std::_Vec_iter_types<double, size_t, ptrdiff_t, double *, const double *, double &, const double &>>>>
This error does not make any sense to me as I am not overloading operators, there is no object here and both vectors of type double.