Visual Studio 6.0 bug
-
i'm writing a header file and i have the following code: public: ... private: T arr[]; // when i compile it tells me that it is an illegal zero-sized array what i dont understand is that i works fine on a linux compiler, so what does zero-sized array mean alex
-
i'm writing a header file and i have the following code: public: ... private: T arr[]; // when i compile it tells me that it is an illegal zero-sized array what i dont understand is that i works fine on a linux compiler, so what does zero-sized array mean alex
-
i'm writing a header file and i have the following code: public: ... private: T arr[]; // when i compile it tells me that it is an illegal zero-sized array what i dont understand is that i works fine on a linux compiler, so what does zero-sized array mean alex
it isn't safe for linux to allow that actually. imo what vc++ did is correct. anyway if u want a zero-sized array, do u mean u're going to allocate memory to the array on the fly? if so, u should declare it as a pointer. i.e. T *ptr; then u should use new and delete to alloc and free the memory respectively. even better, use vectors as it does all the memory handling for u. http://www.roguewave.com/support/docs/sourcepro/stdlibref/vector.html[^]