Let\'s say I have a base template class Array:
template class Array{
protected:
T* m_data;
int size;
public:
Combine your solutions, use the initializer list and the full name:
NumericArray::NumericArray(int n)
: Array(n)
{
}
Also, since they become a dependent name, fields of Array have to be accessed like this:
Array::m_data; // inside a NumericArray method
Also, if it's not some experiment or homework, please use std::vector instead of pointer and size.