I've been developing my own stack implementation. data is my main storage mechanism:
I've supplied all the functionality I need for the stack except for a class iterator to loop through the stack's values. I'm looking to do something like this:
template<class T> class Stack
typedef T* iter;
What should I have the begin() and end() functions return? An iterator is basically a pointer to the stack data right? I'm stuck.
cout << *it << endl;
Am I on the right track?
inline iter begin()
iter front= ... //????