How to Sum Column of a Matrix and Store it in a Vector in C++
Is there a straight forward way to do it? I'm stuck here: #include <iostream> #include <vector> #include <cstdlib> using std::size_t; using std::vector; int main() { vector<vector<int> > Matrix; //Create the 2x2 matrix. size_t rows = 2; size_t cols = 2; // 1: set the number of rows. Matrix.resize(rows); for(size_t...