I'm currently trying to learn how to effectively use the STL part of c++. Say there are 2 vectors of the same type of equal length that need to be transformed into another vector of the same length by applying some operator, is there a good way to do this using the functionality of the STL?
Here's some pseudocode for what I'm trying to do:
vector<T> a;
vector<T> b;
vector<T> result;
for (int i = 0; i < a.size(); ++i){
result.at(i) = a.at(i) op b.at(i);
}
where "op" is some operator that is defined for type T.