Hi.
I'm using GCC's c++ compiler, and when attempting to create a template class containing an N-length array;
... and start using(i.e. calling functions manipulationg C::_array) a single instance of the class; everything is fine. But when several instances exist, the array is zeroed-out, and stays that way.Code:template <int N> class C { public: { ... } private: { ... } int _array[N]; };
If I use a dynamic array, then no problem. Is there any way to get fixed-length arrays as class-members in GCC-c++?
Thanks in advance!



LinkBack URL
About LinkBacks



