I have my c++ code which I need to static cast a vector object A to vector object B.
This is my c++ code:
void notifyTestResultEvent(ObjectA &results) {
std::cout << results << std::endl;
std::vector<ObjectA> res;
res = results.getResults();
std::copy(res.begin(), res.end(), ra.begin());
}
ra
is the vector of objectB.
According to an answer from Stackoverflow. I tried to use std::copy()
but it shows error error: no match for 'operator=' (operand types are ...
I am not really sure what is the right way to cast a vector in C++.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…