I would like to overload comma , operator so it would be able to init the array.
The array is in the class:
template <class DataType,class IntType>
class Matrix
{
public:
DataType *Elements;
IntType Rows, Cols;
//some other functions and operators
};
How do I achieve the functionality lik in the blitz++ library, that allows to use such syntax:
Matrix<float,int> M;
M.Resize(2,2);
M=1, 0,
0, 1;
I have read some tutorials on internet and posts on gamedev and stackoverflow but I havent found what I was really looking for. Also tried to find implementation in blitz++ of this feature but without success.
Any help or suggestions would be appreciated,
Thanks in advance