Hey , there,
I though it is an easy one, but I am stuck here: I have a class like this:
now I want to reuse it for time_t value type, i.e., the data[] inside the class shall be time_t array, and the method getvalueatidx(int idx) should return time_t as well.Code:class Circulararray(){ int l; double* data; public: Circulararray(int length): l(length){ data = new double[l]; } ~Circulararray(){delete[] data;} double getvalueatidx(int idx){...} void putatfront(double value){...} }
how to design and reuse?



LinkBack URL
About LinkBacks



)