i was reading a code from the book i study from and i saw that it appeared a variable, or i dont know what that is named "_m" this was never declared, and it apeared only once in the whole code. I tryed to compile it and it compiled succesfully. What does _m mean? here is the piece of code where it appears:
Code:
template <typename T>
void Table<T>::destroy()
{
// Does the matrix exist?
if( mDataMatrix )
{
for(int i = 0; i < _m; ++i)
{
// Does the ith row exist?
if(mDataMatrix[i] )
{
// Yes, delete it.
delete[]mDataMatrix[i];
mDataMatrix[i] = 0;
}
}
// Delete the row-array.
delete[] mDataMatrix;
mDataMatrix = 0;
}
mNumRows = 0;
mNumCols = 0;
}
and also, the compiler gives me a warning saying that the way i declared a function was obsolete. i decalred it as follows:
Code:
template <typename T>
Table<T>::Table<T>()
and the compiler says that insted of that i should compile it as:
Code:
template <typename T>
Table<T>::Table()
is it the same? or is it better the way the compiler tells me to do?
thank you,
Cherry.