Unsolved How to multiply a QVector with a scalar?
-
I would like to multiply all the elements in a QVector with a fixed value, is it possible to do it with QVector at all? I searched QAlgorithms but there is no such feature. In C++ one could use for example:
vector <T> R(A.size()); std::transform(A.begin(), A.end(), R.begin(), std::bind1st(std::multiplies<T>(),c));
Which would be really ideal for me if I could do the same with QVector.
-
Why not just use algorithms on QVector? It has iterators.
-
@Thinium said in How to multiply a QVector with a scalar?:
Which would be really ideal for me if I could do the same with QVector.
You can do exactly the same with a QVector ...