Jack
2010-05-01 08:44:07 UTC
Dear all,
std::vector<x> finalvector;
std::vector<x> x1;
std::vector<std::vector<x>> x2;
for (...)
{
for (...) {
x1.push_back(data);
}
x2.push_back(x1);
}
std::vector<std::vector<x>>::reverse_iterator it;
for (it = x2.rbegin(); it != x2.end(); it++)
{
finalvector.push_back(**it); <<<<<<<<<<<<< compilation error
}
I'd like to reverse a grid in a y-axis while keeping the x-axis components
intact.
For example
1 2 3 4 5 6 7 8
a b c d e f g h
to
a b c d e f g h
1 2 3 4 5 6 7 8
Is it the correct way of doing it?
Thanks in advance
Jack
std::vector<x> finalvector;
std::vector<x> x1;
std::vector<std::vector<x>> x2;
for (...)
{
for (...) {
x1.push_back(data);
}
x2.push_back(x1);
}
std::vector<std::vector<x>>::reverse_iterator it;
for (it = x2.rbegin(); it != x2.end(); it++)
{
finalvector.push_back(**it); <<<<<<<<<<<<< compilation error
}
I'd like to reverse a grid in a y-axis while keeping the x-axis components
intact.
For example
1 2 3 4 5 6 7 8
a b c d e f g h
to
a b c d e f g h
1 2 3 4 5 6 7 8
Is it the correct way of doing it?
Thanks in advance
Jack