ArrayClass( int size )
{
//m_pArrayData = 0;
m_pArrayData = new DataType[size]; // init the dynamic array
m_arraySize = size; // size of the array
}
this is the way the "[]" is overloaded to init the positions of the array:
DataType& operator[]( int index )
{
return m_pArrayData[index]; // i.e. array[20] = 10
}
my question is: if possible, how can i do a function that overloads some operator for this type of initialization..... ArrayClass