Let's say I want to turn this:
Into something this:Code:void calculate_randomness (int * begin, int * end) { int * manipulator_array = new int[end - begin]; // mathematical analysis }
RandIter::type is a field I made up just for illustration purposes, but I would like to find its equivalent. If I am given a RandIter, how do I construct an object of type (*RandIter)?Code:template <typename RandIter> void calculate_randomness (RandIter begin, RandIter end) { RandIter::type * manipulator_array = new RandIter::type[end - begin]; // mathematical analysis }



LinkBack URL
About LinkBacks


