Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-05 10:48:49


AMDG

Klett, Stefan wrote:
> Hi List Members,
>
> While still trying putting boost::multi_array to work I ran into the
> next obstacle - my current code is fairly like in the multi_array "short
> example"
>
> That is :
>
> #include "boost/multi_array.hpp"
> class NwLayer
> {
>
> typedef boost::multi_array<double,3> neural_op;
> typedef neural_op::index index ;
> neural_op NeuralOperator(boost::extents[10][10][10]);
> }
> unfortunately I still get the compile time error
>
> In file included from ../NwLayer.cpp:1:
> ../NwLayer.h:12: Fehler: >boost::extents< is not a type
>
> on the last line of the above code snippet
>
> Is there anyone around who could explain to me what I can do to get rid
> of the error message ?
>

You can't initialize a member inside the class body in C++ (unlike
java). It needs to
be done from the constructor.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net