0
In my teacher’s code, he passed the following class template, with the constructor defined below:
template<typename T>
class CircularBuffer {
std::vector<T> _elements;
size_t _first, _n;
public:
CircularBuffer(size_t n);
void push(T v);
T front() const;
void pop();
size_t size() const;
};
template<typename T>
CircularBuffer<T>::CircularBuffer(size_t n)
: _elements(n), _first(0), _n(0) //?
{
}
I would like to understand what is and the usefulness of the line of code I marked with a comment and question mark
That? https://answall.com/q/169175/101
– Maniero