Boost logo

Ublas :

Subject: Re: [ublas] define a matrix in my class
From: Gianluigi Caddeo (ggigi78_at_[hidden])
Date: 2010-02-02 09:00:40


hi

I solved in this manner:

    ublas::identity_matrix<double> qt; // declaration

qt=identity_matrix<double> (3); // initialization

thanks

gigi

On Mon, Feb 1, 2010 at 7:00 PM, Gianluigi Caddeo <ggigi78_at_[hidden]> wrote:

> hi
>
> I try to define a matrix in my class but
> I'have every time this problem:
>
> myclass.h:53: error: expected identifier before numeric constant
> myclass.h:53: error: expected ‘,’ or ‘...’ before numeric constant
>
> the code is like this:
>
> #include <boost/numeric/ublas/blas.hpp>
> #include <boost/numeric/ublas/matrix.hpp>
>
> namespace ublas = boost::numeric::ublas;
>
> class myclass {
>
> public:
>
> ublas::identity_matrix<double> qt(3);
>
> };
>
>
> where is the problem? please help me...
>
>
> thanks you
>
> gigi
>