Boost logo

Ublas :

Subject: Re: [ublas] define a matrix in my class
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2010-02-01 13:10:42

Gianluigi Caddeo wrote:
> where is the problem?

So you are proposing a riddle?

> the code is like this:
> [...]
> class myclass {
> public:
> ublas::identity_matrix<double> qt(3);
> };

This is a member declaration, so "(3)" is confusing for the compiler. Do you want the compiler to call the constructor of the member myclass::qt with the parameter "3" in the constructors of myclass? Then you have to write this explicitly in the constructors of myclass, there is no abbreviation for this.