#include #include #include "list_iterator.h" using namespace std; node c = {30, 0}; node b = {20, &c}; node a = {10, &b}; inline const list_iterator& begin() { static const list_iterator it(&a); return it; } inline const list_iterator& end() { static const list_iterator it(0); return it; } int main() { for (list_iterator it = begin(); it != end(); ++it) { cout << *it << "\n"; //cout << it.operator*() << "\n"; } return EXIT_SUCCESS; }