class BFS{
public:
BFS(){}
BFS(char filename);
~BFS(){}
void display(Node *p);
void Eight();
void showFront();
private:
Input ex1;
queue<Node> q;
set t;
};
BFS::BFS(char *filename){
ex1 = Input(filename);
Node *x = new Node;
x = &Node(ex1.p);
q.push(x);
showFront();
}
int main(){
char *filename = "input.txt";
BFS bfs(filename);
bfs.showFront();
//bfs.Eight();
return 0;
}
void BFS::showFront(){
cout<
for(int i=0;i
for(int j=0;j
coutp[i][j]<<" ";
}
cout<<endl;
}
system("pause");
}
我在构造函数内输出q.front的信息是对的,但是我在
main()里面输出却错了。求问各位大大这是什么情况。。