The part in bold above. What does the colon mean/do? What's it called?! It's came out of nowhere in my work at uni and in my book. If someone can tell me what it's called then that would be great and I can find out from there.Code:template <class T> class Calculator { public: Calculator(const T &x, const T &y) : _x(x), _y(y) {} ~Calculator(void){ } const T add(void){ return _x + _y; } const T sub(void){ return _x -_y; } const T mult(void){ return _x * _y; } const T div(void){ return _x / _y; } private: const T _x; const T _y; };
Cheers!