GCC:Static(fixed-length) array in template class
Hi.
I'm using GCC's c++ compiler, and when attempting to create a template class containing an N-length array;
Code:
template <int N>
class C
{
public:
{ ... }
private:
{ ... }
int _array[N];
};
... 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.
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!