I'm trying to put a 2 dimensional array in a queue... How could I do that?
#include<iostream>
#include<queue>
using namespace std;
struct state
{
int puzzle[2][2];
};
int main()
{
state p;
p.puzzle[0][0]=1;
p.puzzle[0][1]=2;
p.puzzle[0][2]=3;
p.puzzle[1][0]=8;
p.puzzle[1][1]=0;
p.puzzle[1][2]=4;
p.puzzle[2][0]=7;
p.puzzle[2][1]=6;
p.puzzle[2][2]=5;
queue<int> Queue;
Queue[front] = p;
while(!Queue.empty())
{
cout<<" "<<Queue.front()<<endl;
Queue.pop();
}
}