I have a following problem: I would like to make an array template in C++ that would have similar operator like one in Scilab/Matlab:
Array[range] = scalar;
This expression would cause all elements of Array listed in range, take value of scalar. How do I do that?
class FloatArray
{
public:
float Elements[100];
//how do I define operator
??? operator [ ] (int *Range)
{ }
//and operator
???? operator = (???)
{ }
};
To obtain this?
Regards,
Misery