I use multi array boost
But I have problem : - I can't declare
a multi array as a member variable , I have the error: unexpected "error C2321:
syntax error : unexpected 'boost::extents"
When I don' write the keyword "typdef"
I have more mistakes.
//Boost library
#include
<Boost/multi_array.hpp>
#include <cassert>
//Name Space
using namespace std;
using namespace boost;
class MyClass
{
typedef
boost::multi_array<double,2>array_type_2d;
public:
MyClass();
virtual ~MyClass();
array_type_2d
M(boost::extents[10][10]);
};
So I want to have : but I don't
manage it.
//myClass.h
//////////////////////////
//Boost library
#include
<Boost/multi_array.hpp>
#include <cassert>
//Name Space
using namespace std;
using namespace boost;
class myClass
{
boost::multi_array<double,2>array_type_2d;
private :
int dim1, dim2;
array_type_2d MyMatrice(boost::extents[dim1][dim2])
;
array_type_2d
MySecondMatrice(boost::extents[10][10]) ;
};
//myClass.cpp
////////////////////////////////
void myClass::tester()
{
for (int i= 0 ; i<dim1; +)
for(int
j=0;j<dim2;j++)
MyMatrice[i][j] = 15;
}
for ( i= 0 ; i<10; +)
for(int
j=0;j<10;j++)
MySecondMatrice[i][j] =
0;
}
Thankssss