#pragma once
/**
	µü´úÆ÷
*/
template<class T>
class Iterator {
public:
	Iterator(T* p, int c) :data(p), len(c) {}

	int valid() const
	{
		return len > 0;
	}

	T next()
	{
		--len;
		return *data++;
	}

private:
	T* data;
	int len;
};
