我的代码中有两个结构
struct Node
{
int no;
Node* next1;
Node* next2;
char path1;
char path2;
};
struct NodeSet
{
Node* entry;
Node* exit;
};
和一个双端队列
deque<NodeSet> nsQueue[100]
问题是当运行到:nsQueue[level+1].push_back(ns)
执行前:+
ns {entry=0x0026f5a0 {no=2 next1=0x0026f350 {no=3 next1=0x002999e8 {no=4 next1=0x00299a38 {...} next2=0xcdcdcdcd {...} ...} ...} ...} ...} NodeSet
执行后:+
ns {entry=0x0026f5a0 {no=2 next1=0x0026f350 {no=-858993460 next1=0x00000000 {no=??? next1=??? next2=??? ...} ...} ...} ...} NodeSet
为什么价值观会改变?感谢帮助。