Hi to all.
Sorry for my English.
I'm trying to use a boost::multi_array as a private member of a class.
How I can specifying the number of elements for every dimensions into
the constructor?
#include <iostream>
#include "boost/multi_array.hpp"
using namespace std;
typedef boost::multi_array<int, 2> table;
class X
{
public:
X();
~X(){};
// ...
void do_something();
private:
table tab;
boost::array<table::index, 2> dims;
};
X::X()
{
dims = {{3, 5}}; // fails
table(dims);
}
int main()
{
X x;
x.do_something();
system("PAUSE");
return 0;
}
Thanks to all.
Sergio
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.