C++ Templates : define an array -
i have template
template <class t, int size=0> class gpr and want declare array example int [5], requires specify size example 5. if write :
gpr<int, 5> ap; does mean have int[5] or need modify place of int:
gpr<new int[5], 5> app; ?? or
gpr<double, 5> pda = new double[5]; ??
it dependent on class implementation. can access using gpr ap; , gpr app; create array of template object.
Comments
Post a Comment