I'm going through some C++ learning and I am tackling this question on Hackerrank.
I think I understand how templates work and the example given, except for one line:
template <class T>
class MyTemplate {
T element;
public:
MyTemplate (T arg) { element = arg; } //what does this line do?
T divideBy2 () { return element/2; }
};