6 Aug
2008
6 Aug
'08
5:26 p.m.
From an example on teh Boost website, I can use matrix as follows: #include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; matrix<double> m (3, 3); for (unsigned i = 0; i < m.size1 (); ++ i) for (unsigned j = 0; j < m.size2 (); ++ j) m (i, j) = 3 * i + j; std::cout << m << std::endl; } But I want to use Boost matrix where I don't know the size at the time the matrix is declared. I want to do something like matrix<double> *m; then later m=new matrix<double> How do I do this? Ed