Hi All,
I'm trying to use the boost::multi_array in VS2010 Express and am having troubles getting the example code in the boost documentation to work for even basic things.
I have the following code straight from the sample :-
#include "multi_array.hpp"
#include <vector>
#include <string>
using namespace std;
typedef boost::multi_array<double, 3> array_type;
typedef array_type::index index;
array_type A(boost::extents[3][4][2]); |
The first problem is at the <double, 3> with a comment under the ">" stating
"Ërror: Too few arguments for class template boost::multi_array"
I can get rid of that error by changing to <double, 3> to
<double, 3, std::allocator<double>>
So it seems not to be accepting the default allocator. No idea if this is correct, but it removes the warning in the IDE
Now the second problem, even after I've fixed up the first one, is that extents is underlined and the message says
"Error: namespace boost has no member extents"
I have no idea how to get rid of that error or why either of these errors have occurred when I have used the sample code and nothing on google suggests anyone else has had this problem.
I'm new to Visual Studio and C++ in general, so sorry if the answer is obvious, but I can't find it. If anyone has any advice, I'd appreciate it.
Thanks.