:sad: Write a C++ template class Nvector that enables arrays with negative subscripts to be
defined. The class should be usable in the following code fragment:
Nvector<double> a; // instantiate double array class
a.resize(-10, 10); // allocate array from locations -10 to 10
for(int i=-10 ; i<=10 ; ++i)
a[i] = exp(-k*(T-t[i])); // fill array
<< moderator edit: added code tags: [code][/code] >>
The class should be written so that array set/access is optimally efficient. Show through the template specification that multidimensional arrays can also be defined.