From: <ms...@ii...> - 2008-07-19 07:33:43
|
Hi, I tried declaring an array using a global size variable, but it gives me some weird error. Is this not possible, or am I doing something wrong? #include <blitz/array.h> using namespace blitz; const int size = 50; class C { Array<double, 2> A( size, size ); }; int main() { C c; } It gives the following error: test.cpp:30: error: ‘size’ is not a type test.cpp:30: error: ‘size’ is not a type I've gotten around this error with a kludge by creating a temp array of the required size in a public constructor and then resizing my Array A to this temp array. But this looks ugly and I was hoping for a better solution to this. |