#include <stack>
#include <iostream>
using namespace std;
typedef struct {
	int x;
	int y;
} position;
std::stack<position> dfsStack;   //stack for dfs traversal
int main(void) {
	position current;  //initialise current position
	current.x = 0;
	current.y = 0;
	position startPosition;   //initialise start position
	startPosition.x = 1;
	startPosition.y = 2;
	dfsStack.push(startPosition);  //dfs initialise stack with start position
	for (int i = 0; i < 10; i++)  //push a shed load of positions onto rthis stack to test it.
	{								// not part of the dfs algorithm!!!!!!!!!!!!!!
		for (int j = 0; j < 10; j++){
			current.x = i;
			current.y = j;
			dfsStack.push(current);
		}
	}
	//dfs while loop
	while (!dfsStack.empty()){
		current = dfsStack.top();  //top plus pop equals a stack pop operation
		dfsStack.pop();
		//push all adjacent nodes	//mark where you are //draw maze with your current position marked
		cout << "Popping (" << current.x << "," << current.y<<")" << endl;
	}
	return 0;
}