#pragma once
template <typename T>
class chainNode {
public:
	T element;
	chainNode<T>* next;
	//C11 can write like : std::unique_ptr<chainNode<T>> next;

public:
	chainNode();
	chainNode(const T& x, chainNode<T>* next = nullptr);

};

template <typename T>
chainNode<T>::chainNode() {
	this->next = nullptr;
}

template <typename T>
chainNode<T>::chainNode(const T& x, chainNode<T>* next) : element(x), next(next) {
}
