
On 02/06/11 16:19, Alle Meije Wink wrote: [snip]
But now, when I try to compile this to see if I'm on the right track, my non-default constructor in which I specify the dimensionality d and dimensions dims (a vector, or an extents[]) it complains that
||=== bis, Debug ===| /home/amwink/programs/cpp/bis/include/bisArray.hpp|46|error: ‘d’ is not a type| /home/amwink/programs/cpp/bis/include/bisArray.hpp|46|error: ‘dims’ is not a type| /home/amwink/programs/cpp/bis/src/bisArray.cpp|7|error: redefinition of ‘class bis::bisArray
’| /home/amwink/programs/cpp/bis/include/bisArray.hpp|18|error: previous definition of ‘class bis::bisArray ’| ||=== Build finished: 4 errors, 0 warnings ===| The attached code segment is basically as far as I got. I'm not sure now if d and dims should be templated or not? [snip] Hi Alle,
Unfortunately, the code which you attached does not contain the needed #includes. It would help us if you would provide a complete code example. However, the 'not a type' errors are because the in the CTOR: // initialising constructor bisArray(T, d, dims); the last 2 arguments: d, dims have to type. I assume you meant: // initialising constructor bisArray(T, size_t a_dim, size_t* a_extents); However, that's confusing me because that CTOR, I assume, is used toe create one of the variant components, and that, according to: http://www.boost.org/doc/libs/1_45_0/libs /multi_array/doc/reference.html#multi_array requires a compile-time value for NumDims, which, of course, the runtime value, a_dim, is not. So, it might help also if you provided the body of you CTOR also to help us see what you're trying to do. -regards, Larry