Re: returning a ublas matrix from a function

sanann <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <[email protected]>
Thank you very much for that.

but on the other hand i tried the same with another part of my code but i
still get the same error. could you kindly help me through this too.

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    const size_t arraySize = 3;
    boost::numeric::ublas::matrix<double> M[arraySize] =
    {
        boost::numeric::ublas::scalar_matrix<double>(2, 2),
        boost::numeric::ublas::scalar_matrix<double>(3, 3),
        boost::numeric::ublas::scalar_matrix<double>(4, 4)
    };


     for (int i=0;i<4;i++)
     {
         std::cout << M[i]<< std::endl;
     }
     return M;
}

I end up with the same error.
error: invalid conversion from 'boost::numeric::ublas::matrix<double>*' to
'int' [-fpermissive]
      return M;
             ^



--
View this message in context: http://boost.2283326.n4.nabble.com/returning-a-ublas-matrix-from-a-function-tp4666050p4666054.html
Sent from the Boost - uBLAS mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.