Stack for binary tree

I'm having trouble getting started with my nonrecursive traversal. I need to implement a stack that holds pointers rather than int's and I am lost. Here is what I'm using as my node structure:
[code]
struct TNode {
int datum;
TNode* leftPtr;
TNode* rightPtr;
}; // TNode
// ===========
/code]

Any nudge in the right direction would be appreciated.
Well it's a good start. Now all you need to to is chain up all those TNodes.

Something like
1
2
3
4
5
6
// make 2 nodes
TNode* first = new TNode;
TNode* second = new TNode;

//chain those to together
first->leftPtr = second;
Topic archived. No new replies allowed.