Subj : template problem To : borland.public.cpp.borlandcpp From : "news.telus.net" Date : Tue Nov 25 2003 07:03 am Hi, I came across the follow code: template< int order > class Matrix { public: class Row { public: Row( Matrix* _matrix, unsigned int _row ){ matrix = _matrix; row = _row; } float operator[]( unsigned int col ) const { return matrix->element( row, col ); } protected: Matrix* matrix; unsigned int row; }; public: Matrix(); Matrix( float* data ); float determinant(); Matrix transpose(); Matrix operator+( Matrix &m ); Matrix operator-( Matrix &m ); Matrix inverse(); Matrix operator*( Matrix &m ); Matrix operator+=( Matrix &m ); Matrix operator-=( Matrix &m ); Matrix operator/=( float &s ); Matrix operator*=( float &s ); Row operator[]( unsigned int row ){ return Row( this, row ); } public: float element( unsigned int row, unsigned int col ); public: float elements[order][order]; <--- compile error here }; I guess the code is originally compile with VC. When I compile it with Borland C++5.02, I have a compile error at float elements[order][order]; error message is : Array must have at least one element. I compile it with open watcom but don't get this error. Any suggestion to get around this error? .