Answer the question
In order to leave comments, you need to log in
How to correctly apply a function to all elements of a two-dimensional vector?
std::for_each(matrix.begin(), matrix.end(), [&](vector<Cell> cellLine)
{
std::for_each(cellLine.begin(), cellLine.end(), [&](Cell cell)
{
cell.showBody();
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question