boost::multi_array class member

2 Oct
2004
2 Oct
'04
9:24 p.m.
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.
7552
Age (days ago)
7552
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sergio Ferrari